1 | # $Id: Makefile.kmk 94442 2022-04-01 15:08:06Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # VirtualBox Validation Kit.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2022 Oracle Corporation
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 | # The contents of this file may alternatively be used under the terms
|
---|
18 | # of the Common Development and Distribution License Version 1.0
|
---|
19 | # (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | # VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | # CDDL are applicable instead of those of the GPL.
|
---|
22 | #
|
---|
23 | # You may elect to license modified versions of this file under the
|
---|
24 | # terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | #
|
---|
26 |
|
---|
27 | SUB_DEPTH = ../../..
|
---|
28 | include $(KBUILD_PATH)/subheader.kmk
|
---|
29 |
|
---|
30 | # Make sure our Config.kmk is included.
|
---|
31 | ifndef VBOX_VALIDATIONKIT_CONFIG_KMK_INCLUDED
|
---|
32 | include $(PATH_SUB_CURRENT)/Config.kmk
|
---|
33 | endif
|
---|
34 |
|
---|
35 | # Collect install targets
|
---|
36 | VBOX_VALIDATIONKIT_INSTALLS := $(INSTALLS)
|
---|
37 |
|
---|
38 | #
|
---|
39 | # Include sub-makefiles.
|
---|
40 | #
|
---|
41 | include $(PATH_SUB_CURRENT)/tests/Makefile.kmk
|
---|
42 | ifneq ($(KBUILD_HOST),os2) # needs yasm
|
---|
43 | if1of ($(KBUILD_TARGET_ARCH), amd64 x86) # needs yasm
|
---|
44 | include $(PATH_SUB_CURRENT)/bootsectors/Makefile.kmk
|
---|
45 | endif
|
---|
46 | endif
|
---|
47 | include $(PATH_SUB_CURRENT)/utils/Makefile.kmk
|
---|
48 | include $(PATH_SUB_CURRENT)/common/Makefile.kmk
|
---|
49 | include $(PATH_SUB_CURRENT)/testboxscript/Makefile.kmk
|
---|
50 | include $(PATH_SUB_CURRENT)/testdriver/Makefile.kmk
|
---|
51 | include $(PATH_SUB_CURRENT)/testmanager/Makefile.kmk
|
---|
52 |
|
---|
53 | #
|
---|
54 | # Globals.
|
---|
55 | #
|
---|
56 |
|
---|
57 | # The current target is enabled by default.
|
---|
58 | VBOX_WITH_VALIDATIONKIT_PACKING.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = 1
|
---|
59 | ifdef VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
|
---|
60 | VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = 1
|
---|
61 | endif
|
---|
62 |
|
---|
63 | #
|
---|
64 | # Install the test driver framework.
|
---|
65 | #
|
---|
66 | INSTALLS += ValidationKit-testdriver
|
---|
67 | ValidationKit-testdriver_TEMPLATE = VBoxValidationKitR3
|
---|
68 | ValidationKit-testdriver_INST = $(INST_VALIDATIONKIT)testdriver/
|
---|
69 | ValidationKit-testdriver_MODE = a+r,u+w
|
---|
70 | ValidationKit-testdriver_SOURCES := \
|
---|
71 | $(PATH_SUB_CURRENT)/testdriver/__init__.py \
|
---|
72 | $(PATH_SUB_CURRENT)/testdriver/base.py \
|
---|
73 | $(PATH_SUB_CURRENT)/testdriver/btresolver.py \
|
---|
74 | $(PATH_SUB_CURRENT)/testdriver/reporter.py \
|
---|
75 | $(PATH_SUB_CURRENT)/testdriver/testfileset.py \
|
---|
76 | $(PATH_SUB_CURRENT)/testdriver/tst-txsclient.py \
|
---|
77 | $(PATH_SUB_CURRENT)/testdriver/txsclient.py \
|
---|
78 | $(PATH_SUB_CURRENT)/testdriver/vbox.py \
|
---|
79 | $(PATH_SUB_CURRENT)/testdriver/vboxcon.py \
|
---|
80 | $(PATH_SUB_CURRENT)/testdriver/vboxtestfileset.py \
|
---|
81 | $(PATH_SUB_CURRENT)/testdriver/vboxtestvms.py \
|
---|
82 | $(PATH_SUB_CURRENT)/testdriver/vboxwrappers.py \
|
---|
83 | $(PATH_SUB_CURRENT)/testdriver/winbase.py \
|
---|
84 | $(PATH_SUB_CURRENT)/testdriver/win-vbox-net-uninstall.ps1
|
---|
85 | ValidationKit-testdriver_EXEC_SOURCES := \
|
---|
86 | $(PATH_SUB_CURRENT)/testdriver/vboxinstaller.py
|
---|
87 | $(PATH_SUB_CURRENT)/testdriver/txsclient.py_VBOX_PYCHECKER_FLAGS = --no-reimport
|
---|
88 |
|
---|
89 |
|
---|
90 | #
|
---|
91 | # Packing target.
|
---|
92 | #
|
---|
93 | ifndef VBOX_WITHOUT_VALIDATIONKIT_ZIP
|
---|
94 |
|
---|
95 | VBOX_VALIDATIONKIT_INSTALLS := $(filter-out $(VBOX_VALIDATIONKIT_INSTALLS), $(INSTALLS))
|
---|
96 |
|
---|
97 | #
|
---|
98 | # VBoxValidationKit.zip.
|
---|
99 | # TODO: Don't pack the python stuff multiple times? Lazy works for now.
|
---|
100 | #
|
---|
101 | PACKING += $(PATH_OUT)/VBoxValidationKit.zip
|
---|
102 | $(PATH_OUT)/VBoxValidationKit.zip: \
|
---|
103 | $(VBOX_PATH_VALIDATIONKIT)/VBoxValidationKit.iso \
|
---|
104 | $(VBOX_PATH_VALIDATIONKIT)/ \
|
---|
105 | $$(foreach inst, $$(VBOX_VALIDATIONKIT_INSTALLS), \
|
---|
106 | $$(filter $(PATH_STAGE)/$(INST_VALIDATIONKIT)%, $$($$(inst)_2_STAGE_TARGETS)))
|
---|
107 | $(call MSG_L1,Packing the Test Suite $@)
|
---|
108 | $(QUIET)$(RM) -f $@
|
---|
109 | $(foreach os, darwin freebsd linux os2 solaris win,$(foreach arch, x86 amd64 \
|
---|
110 | ,$(if-expr defined(VBOX_WITH_VALIDATIONKIT_PACKING.$(os).$(arch))\
|
---|
111 | ,$(NLTAB)$(QUIET)$(REDIRECT) -C $(PATH_OUT_BASE)/$(os).$(arch)/$(KBUILD_TYPE)/ \
|
---|
112 | -- $(VBOX_ZIP) -r9 $@ $(INST_VALIDATIONKIT) -x '*.pyc',)))
|
---|
113 |
|
---|
114 | #
|
---|
115 | # VBoxTestBoxScript.zip - For setting up the testboxes.
|
---|
116 | #
|
---|
117 | PACKING += $(PATH_OUT)/VBoxTestBoxScript.zip
|
---|
118 | $(PATH_OUT)/VBoxTestBoxScript.zip: \
|
---|
119 | $$(testboxscript_2_STAGE_TARGETS) \
|
---|
120 | $$(testboxscript-common_2_STAGE_TARGETS) \
|
---|
121 | $$(TestBoxHelper_2_STAGE_TARGETS)
|
---|
122 | $(call MSG_L1,Packing the TestBox Script files to $@)
|
---|
123 | $(QUIET)$(RM) -f $@
|
---|
124 | $(foreach os, darwin freebsd linux os2 solaris win,$(foreach arch, x86 amd64 \
|
---|
125 | ,$(if-expr defined(VBOX_WITH_VALIDATIONKIT_PACKING.$(os).$(arch))\
|
---|
126 | ,$(NLTAB)$(QUIET)$(REDIRECT) -C $(PATH_OUT_BASE)/$(os).$(arch)/$(KBUILD_TYPE)/ \
|
---|
127 | -- $(VBOX_ZIP) -r9X $@ $(INST_TESTBOXSCRIPT) -x '*.pyc',)))
|
---|
128 |
|
---|
129 | endif # !VBOX_WITHOUT_VALIDATIONKIT_ZIP
|
---|
130 |
|
---|
131 |
|
---|
132 | #
|
---|
133 | # Automatically lint python code and python unit tests during build.
|
---|
134 | #
|
---|
135 | if defined(VBOX_WITH_PYLINT) && !defined(VBOX_WITHOUT_AUTO_PYLINT)
|
---|
136 | OTHERS += $(PATH_TARGET)/pylint.run
|
---|
137 | OTHER_CLEAN += $(PATH_TARGET)/pylint.run
|
---|
138 | $(PATH_TARGET)/pylint.run: $$(filter-out %/testboxscript.o, $$(VBOX_VALIDATIONKIT_PYLINT_TARGETS))
|
---|
139 | $(QUIET)$(APPEND) -t "$@"
|
---|
140 | endif
|
---|
141 | if defined(VBOX_WITH_PYLINT) && !defined(VBOX_WITHOUT_AUTO_PYUNITTEST) # Tied to pylint for hysterical raisins.
|
---|
142 | OTHERS += $(PATH_TARGET)/pyunittest.run
|
---|
143 | OTHER_CLEAN += $(PATH_TARGET)/pyunittest.run
|
---|
144 | $(PATH_TARGET)/pyunittest.run: $$(VBOX_VALIDATIONKIT_PYUNITTEST_TARGETS)
|
---|
145 | $(QUIET)$(APPEND) -t "$@"
|
---|
146 | endif
|
---|
147 |
|
---|
148 | $(evalcall def_vbox_validationkit_process_python_sources,FORCE)
|
---|
149 | $(evalcall def_vbox_validationkit_process_js_sources,FORCE)
|
---|
150 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
151 |
|
---|
152 |
|
---|
153 |
|
---|
154 |
|
---|
155 | #
|
---|
156 | # Construct the file spec for creating the Validation Kit guest iso.
|
---|
157 | #
|
---|
158 | VBOX_VALIDATIONKIT_FILESPEC = \
|
---|
159 | valkit.txt=$(VBOX_PATH_VALIDATIONKIT_SRC)/docs/valkit.txt \
|
---|
160 | $(VBOX_PATH_VALIDATIONKIT)/vboxtxs-readme.txt
|
---|
161 | ifneq ($(KBUILD_HOST),os2)
|
---|
162 | VBOX_VALIDATIONKIT_FILESPEC += \
|
---|
163 | $(VBOX_PATH_VALIDATIONKIT)/bootsectors/bootsector-pae.img \
|
---|
164 | $(VBOX_PATH_VALIDATIONKIT)/bootsectors/bootsector-shutdown.img
|
---|
165 | endif
|
---|
166 |
|
---|
167 | VBOX_VALIDATIONKIT_FILESPEC_UNITTESTS =
|
---|
168 |
|
---|
169 | # Generate VBOX_PATH_VALIDATIONKIT.os.arch variables.
|
---|
170 | $(foreach os, darwin freebsd linux os2 solaris win,$(foreach arch, x86 amd64, \
|
---|
171 | $(eval VBOX_PATH_VALIDATIONKIT.$(os).$(arch) = $(PATH_OUT_BASE)/$(os).$(arch)/$(KBUILD_TYPE)/$(INST_VALIDATIONKIT)$(os)/$(arch)) \
|
---|
172 | ))
|
---|
173 |
|
---|
174 | # Common files first.
|
---|
175 | define def_vbox_validationkit_common_files
|
---|
176 | ifdef VBOX_WITH_VALIDATIONKIT_PACKING.$(os).$(arch)
|
---|
177 | VBOX_VALIDATIONKIT_FILESPEC += \
|
---|
178 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/exceptionsR3$(TMP_SUFF_EXE) \
|
---|
179 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/cpu-alloc-all-mem$(TMP_SUFF_EXE) \
|
---|
180 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/cpu-numa$(TMP_SUFF_EXE) \
|
---|
181 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/FsPerf$(TMP_SUFF_EXE) \
|
---|
182 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/IoPerf$(TMP_SUFF_EXE) \
|
---|
183 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/NetPerf$(TMP_SUFF_EXE) \
|
---|
184 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/LoadGenerator$(TMP_SUFF_EXE) \
|
---|
185 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/SerialTest$(TMP_SUFF_EXE) \
|
---|
186 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/TestExecService$(TMP_SUFF_EXE) \
|
---|
187 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/vts_rm$(TMP_SUFF_EXE) \
|
---|
188 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/vts_shutdown$(TMP_SUFF_EXE) \
|
---|
189 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/vts_tar$(TMP_SUFF_EXE) \
|
---|
190 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/xmmsaving$(TMP_SUFF_EXE)
|
---|
191 | if1of ($(arch), amd64) ## HACK ALERT! This mirrors VBOX_WITH_R0_MODULES logic in /Config.kmk.
|
---|
192 | VBOX_VALIDATIONKIT_FILESPEC += \
|
---|
193 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/loadgeneratorR0.r0
|
---|
194 | endif
|
---|
195 | ifn1of ($(os), os2) ## not compiling bootsectors, no yasm. could fix this better.
|
---|
196 | VBOX_VALIDATIONKIT_FILESPEC += \
|
---|
197 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/bs3-timing-1$(TMP_SUFF_EXE)
|
---|
198 | endif
|
---|
199 | ifn1of ($(os), os2 freebsd netbsd openbsd) ## must match utils/audio/Makefile.kmk
|
---|
200 | VBOX_VALIDATIONKIT_FILESPEC += \
|
---|
201 | $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/vkat$(TMP_SUFF_EXE)
|
---|
202 | endif
|
---|
203 | endif
|
---|
204 | endef
|
---|
205 |
|
---|
206 | TMP_SUFF_EXE=.exe
|
---|
207 | $(foreach os, os2 win,$(foreach arch, x86 amd64, \
|
---|
208 | $(eval $(def_vbox_validationkit_common_files)) \
|
---|
209 | ))
|
---|
210 | TMP_SUFF_EXE=
|
---|
211 | $(foreach os, darwin freebsd linux solaris,$(foreach arch, x86 amd64, \
|
---|
212 | $(eval $(def_vbox_validationkit_common_files)) \
|
---|
213 | ))
|
---|
214 |
|
---|
215 | # OS specific files - Linux
|
---|
216 | ifdef VBOX_WITH_VALIDATIONKIT_PACKING.linux.x86
|
---|
217 | VBOX_VALIDATIONKIT_FILESPEC += \
|
---|
218 | $(VBOX_PATH_VALIDATIONKIT.linux.x86)/UsbTest
|
---|
219 | endif
|
---|
220 | ifdef VBOX_WITH_VALIDATIONKIT_PACKING.linux.amd64
|
---|
221 | VBOX_VALIDATIONKIT_FILESPEC += \
|
---|
222 | $(VBOX_PATH_VALIDATIONKIT.linux.amd64)/UsbTest
|
---|
223 | endif
|
---|
224 | ifdef VBOX_WITH_VALIDATIONKIT_PACKING.linux.x86
|
---|
225 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.linux.x86)/../vboxtxs)
|
---|
226 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.linux.x86)/../vboxtxs-nat)
|
---|
227 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.linux.x86)/../vboxtxs.service)
|
---|
228 |
|
---|
229 | else ifdef VBOX_WITH_VALIDATIONKIT_PACKING.linux.amd64
|
---|
230 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.linux.amd64)/../vboxtxs)
|
---|
231 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.linux.amd64)/../vboxtxs-nat)
|
---|
232 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.linux.amd64)/../vboxtxs.service)
|
---|
233 | endif
|
---|
234 |
|
---|
235 | # OS specific files - OS/2
|
---|
236 | ifdef VBOX_WITH_VALIDATIONKIT_PACKING.os2.x86
|
---|
237 | VBOX_VALIDATIONKIT_FILESPEC += \
|
---|
238 | $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc06.dll \
|
---|
239 | $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc061.dll \
|
---|
240 | $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc062.dll \
|
---|
241 | $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc063.dll \
|
---|
242 | $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc064.dll \
|
---|
243 | $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc065.dll \
|
---|
244 | $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc066.dll
|
---|
245 | endif
|
---|
246 |
|
---|
247 | # OS specific files - Solaris
|
---|
248 | ifdef VBOX_WITH_VALIDATIONKIT_PACKING.solaris.x86
|
---|
249 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.solaris.x86)/../vboxtxs.sh)
|
---|
250 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.solaris.x86)/../vboxtxs.xml)
|
---|
251 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.solaris.x86)/../vboxtxs-sol10.xml)
|
---|
252 | else ifdef VBOX_WITH_VALIDATIONKIT_PACKING.solaris.amd64
|
---|
253 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.solaris.amd64)/../vboxtxs.sh)
|
---|
254 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.solaris.amd64)/../vboxtxs.xml)
|
---|
255 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.solaris.amd64)/../vboxtxs-sol10.xml)
|
---|
256 | endif
|
---|
257 |
|
---|
258 | # OS specific files - Windows
|
---|
259 | ifdef VBOX_WITH_VALIDATIONKIT_PACKING.win.x86
|
---|
260 | VBOX_VALIDATIONKIT_FILESPEC += \
|
---|
261 | $(VBOX_PATH_VALIDATIONKIT.win.x86)/ntSetFreq.exe \
|
---|
262 | $(VBOX_PATH_VALIDATIONKIT.win.x86)/ntTimeSources.exe
|
---|
263 | # Disabled for now; does not work without WinMM.dll export verification files.
|
---|
264 | #ifdef VBOX_WITH_AUDIO_VALIDATIONKIT
|
---|
265 | # VBOX_VALIDATIONKIT_FILESPEC += \
|
---|
266 | # $(VBOX_PATH_VALIDATIONKIT.win.x86)/ntPlayToneWaveX.exe
|
---|
267 | #endif
|
---|
268 | endif
|
---|
269 | ifdef VBOX_WITH_VALIDATIONKIT_PACKING.win.amd64
|
---|
270 | VBOX_VALIDATIONKIT_FILESPEC += \
|
---|
271 | $(VBOX_PATH_VALIDATIONKIT.win.amd64)/ntSetFreq.exe \
|
---|
272 | $(VBOX_PATH_VALIDATIONKIT.win.amd64)/ntTimeSources.exe
|
---|
273 | # Disabled for now; does not work without WinMM.dll export verification files.
|
---|
274 | #ifdef VBOX_WITH_AUDIO_VALIDATIONKIT
|
---|
275 | # VBOX_VALIDATIONKIT_FILESPEC += \
|
---|
276 | # $(VBOX_PATH_VALIDATIONKIT.win.amd64)/ntPlayToneWaveX.exe
|
---|
277 | #endif
|
---|
278 | endif
|
---|
279 | ifdef VBOX_WITH_VALIDATIONKIT_PACKING.win.x86
|
---|
280 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.x86)/../vboxtxs.cmd)
|
---|
281 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.x86)/../vboxtxs.reg)
|
---|
282 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.x86)/../vboxtxs-nat.cmd)
|
---|
283 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.x86)/../vboxtxs-nat.reg)
|
---|
284 | else ifdef VBOX_WITH_VALIDATIONKIT_PACKING.win.amd64
|
---|
285 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.amd64)/../vboxtxs.cmd)
|
---|
286 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.amd64)/../vboxtxs.reg)
|
---|
287 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.amd64)/../vboxtxs-nat.cmd)
|
---|
288 | VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.amd64)/../vboxtxs-nat.reg)
|
---|
289 | endif
|
---|
290 |
|
---|
291 | #
|
---|
292 | # If enabled, this includes the unit tests located in the $(PATH_OUT)/testcase directory.
|
---|
293 | # This is useful if we want to run those on platforms where we don't have / support
|
---|
294 | # any host support anymore (like Windows XP, for instance).
|
---|
295 | #
|
---|
296 | # Note that executing the tests require an additional component (tdUnitTest test driver)
|
---|
297 | # which runs as part of the Validation Kit.
|
---|
298 | #
|
---|
299 | # See @bugref{10195}
|
---|
300 | #
|
---|
301 | ifdef VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
|
---|
302 |
|
---|
303 | # Only include testcases being on the whitelist.
|
---|
304 | #TMP_UNITTESTS_WHITELIST := \
|
---|
305 | # tstFile \
|
---|
306 | # tstFileLock \
|
---|
307 | # tstRTLocalIpc \
|
---|
308 | # tstRTPathQueryInfo \
|
---|
309 | # tstRTPipe \
|
---|
310 | # tstRTProcCreateEx \
|
---|
311 | # tstRTProcCreatePrf \
|
---|
312 | # tstRTProcQueryUsername \
|
---|
313 | # tstTime-2 \
|
---|
314 | # tstTime-3 \
|
---|
315 | # tstTime-4 \
|
---|
316 | # tstTimer \
|
---|
317 | # tstThread-1 \
|
---|
318 | # tstUtf8
|
---|
319 | #
|
---|
320 | #TMP_UNITTESTS_WHITELIST.linux += \
|
---|
321 | # tstRTProcWait \
|
---|
322 | # tstRTProcIsRunningByName
|
---|
323 | #
|
---|
324 | #TMP_UNITTESTS_WHITELIST.win += \
|
---|
325 | # tstRTProcWait
|
---|
326 |
|
---|
327 | TMP_UNITTESTS_WHITELIST := \
|
---|
328 | tstFile
|
---|
329 |
|
---|
330 | #
|
---|
331 | # Included needed dependencies like VBoxRT (VBoxVMM?).
|
---|
332 | # Needs careful checking for each and every testcase being run.
|
---|
333 | #
|
---|
334 | ## @todo Also include R0 and hardening stuff?
|
---|
335 | #
|
---|
336 | TMP_UNITTESTS_DEPS_LIB := \
|
---|
337 | VBoxRT
|
---|
338 |
|
---|
339 | define def_vbox_validationkit_unittests
|
---|
340 | TMP_UNITTESTS_PATH_BIN = $(PATH_OUT_BASE)/$(os).$(arch)/$(KBUILD_TYPE)/bin
|
---|
341 | VBOX_VALIDATIONKIT_FILESPEC_UNITTESTS += \
|
---|
342 | $(foreach test_whitelist, $(TMP_UNITTESTS_WHITELIST), \
|
---|
343 | $$(wildcard $(TMP_UNITTESTS_PATH_BIN)/testcase/$(test_whitelist)$(TMP_SUFF_EXE)))
|
---|
344 | VBOX_VALIDATIONKIT_FILESPEC_UNITTESTS += \
|
---|
345 | $(foreach file_dep, $(TMP_UNITTESTS_DEPS_LIB), \
|
---|
346 | $$(wildcard $(TMP_UNITTESTS_PATH_BIN)/$(file_dep)$(TMP_SUFF_LIB)))
|
---|
347 | endef
|
---|
348 |
|
---|
349 | TMP_SUFF_EXE=.exe
|
---|
350 | TMP_SUFF_LIB=.dll
|
---|
351 | $(foreach os, win,$(foreach arch, x86 amd64, \
|
---|
352 | $(eval $(def_vbox_validationkit_unittests)) \
|
---|
353 | ))
|
---|
354 | TMP_SUFF_EXE=
|
---|
355 | TMP_SUFF_LIB=.so
|
---|
356 | $(foreach os, freebsd linux solaris,$(foreach arch, x86 amd64, \
|
---|
357 | $(eval $(def_vbox_validationkit_unittests)) \
|
---|
358 | ))
|
---|
359 | TMP_SUFF_EXE=
|
---|
360 | TMP_SUFF_LIB=.dylib
|
---|
361 | $(foreach os, darwin,$(foreach arch, amd64, \
|
---|
362 | $(eval $(def_vbox_validationkit_unittests)) \
|
---|
363 | ))
|
---|
364 | endif # VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
|
---|
365 |
|
---|
366 | #
|
---|
367 | # Build the Validation Kit guest ISO.
|
---|
368 | #
|
---|
369 | $(VBOX_PATH_VALIDATIONKIT)/VBoxValidationKit.iso: \
|
---|
370 | $(filter-out %=deleteme=, $(subst =,=deleteme= , $(VBOX_VALIDATIONKIT_FILESPEC))) \
|
---|
371 | $(VBOX_SVN_REV_KMK) \
|
---|
372 | $(VBOX_PATH_VALIDATIONKIT_SRC)/Makefile.kmk \
|
---|
373 | | $(if-expr defined(VBOX_USE_RTISOMAKER),$(VBOX_RTISOMAKER),)
|
---|
374 | $(call MSG_TOOL,RTIsoMaker,,$@)
|
---|
375 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
376 | ifneq ($(KBUILD_TARGET),os2)
|
---|
377 | $(QUIET)$(ECHO) VBOX_VALIDATIONKIT_FILESPEC $(VBOX_VALIDATIONKIT_FILESPEC)
|
---|
378 | endif
|
---|
379 | ifdef VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
|
---|
380 | $(QUIET)$(ECHO) VBOX_VALIDATIONKIT_FILESPEC_UNITTESTS $(VBOX_VALIDATIONKIT_FILESPEC_UNITTESTS)
|
---|
381 | endif
|
---|
382 | $(VBOX_RTISOMAKER) \
|
---|
383 | --output $@ \
|
---|
384 | --iso-level 3 \
|
---|
385 | --rock-ridge \
|
---|
386 | --joliet \
|
---|
387 | --rational-attribs \
|
---|
388 | --random-order-verification 2048 \
|
---|
389 | $(foreach spec,$(VBOX_VALIDATIONKIT_FILESPEC) \
|
---|
390 | ,$(if $(findstring =,$(spec)), $(spec), /$(lastword $(subst /$(INST_VALIDATIONKIT), ,$(spec))=$(spec))) ) \
|
---|
391 | $(foreach spec,$(VBOX_VALIDATIONKIT_FILESPEC_UNITTESTS) \
|
---|
392 | ,$(if $(findstring =,$(spec)), $(spec), /$(lastword $(subst $(PATH_OUT_BASE), testcase,$(spec))=$(spec))) ) \
|
---|
393 | $(foreach spec,$(filter-out %.txt %.dll %.xml %.reg %.img, $(VBOX_VALIDATIONKIT_FILESPEC)) \
|
---|
394 | ,--chmod=a+x:/$(lastword $(if $(findstring =,$(spec)), \
|
---|
395 | $(subst =, $(SP), $(spec)), \
|
---|
396 | $(subst /$(INST_VALIDATIONKIT), ,$(spec))))) \
|
---|
397 | $(foreach spec,$(filter-out %.txt %.dll %.xml %.reg %.img, $(VBOX_VALIDATIONKIT_FILESPEC_UNITTESTS)) \
|
---|
398 | ,--chmod=a+x:/$(lastword $(if $(findstring =,$(spec)), \
|
---|
399 | $(subst =, $(SP), $(spec)), \
|
---|
400 | $(subst $(PATH_OUT_BASE), testcase,$(spec))))) \
|
---|
401 | --volume-id "VBOXVALK_$(VBOX_SVN_REV)_$(VBOX_VERSION_STRING_RAW)" \
|
---|
402 | --name-setup joliet \
|
---|
403 | --volume-id "VBoxValK $(VBOX_SVN_REV)"
|
---|
404 |
|
---|
405 | # Alias for creating the iso.
|
---|
406 | .PHONY: validationkit-iso
|
---|
407 | validationkit-iso: $(VBOX_PATH_VALIDATIONKIT)/VBoxValidationKit.iso
|
---|