VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/Makefile.kmk@ 79158

Last change on this file since 79158 was 79158, checked in by vboxsync, 6 years ago

tdAddGuestCtrl.py: More cleanups. bugref:9151 bugref:9320

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 12.1 KB
Line 
1# $Id: Makefile.kmk 79158 2019-06-16 01:27:41Z vboxsync $
2## @file
3# VirtualBox Validation Kit.
4#
5
6#
7# Copyright (C) 2006-2019 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
27SUB_DEPTH = ../../..
28include $(KBUILD_PATH)/subheader.kmk
29
30# Make sure our Config.kmk is included.
31ifndef VBOX_VALIDATIONKIT_CONFIG_KMK_INCLUDED
32 include $(PATH_SUB_CURRENT)/Config.kmk
33endif
34
35# Collect install targets
36VBOX_VALIDATIONKIT_INSTALLS := $(INSTALLS)
37
38#
39# Include sub-makefiles.
40#
41include $(PATH_SUB_CURRENT)/tests/Makefile.kmk
42ifneq ($(KBUILD_HOST),os2) # need yasm
43 include $(PATH_SUB_CURRENT)/bootsectors/Makefile.kmk
44endif
45include $(PATH_SUB_CURRENT)/utils/Makefile.kmk
46include $(PATH_SUB_CURRENT)/common/Makefile.kmk
47include $(PATH_SUB_CURRENT)/testboxscript/Makefile.kmk
48include $(PATH_SUB_CURRENT)/testdriver/Makefile.kmk
49include $(PATH_SUB_CURRENT)/testmanager/Makefile.kmk
50
51#
52# Globals.
53#
54
55# The current target is enabled by default.
56VBOX_WITH_VALIDATIONKIT_PACKING.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = 1
57
58
59#
60# Install the test driver framework.
61#
62INSTALLS += ValidationKit-testdriver
63ValidationKit-testdriver_TEMPLATE = VBoxValidationKitR3
64ValidationKit-testdriver_INST = $(INST_VALIDATIONKIT)testdriver/
65ValidationKit-testdriver_MODE = a+r,u+w
66ValidationKit-testdriver_SOURCES := \
67 $(PATH_SUB_CURRENT)/testdriver/__init__.py \
68 $(PATH_SUB_CURRENT)/testdriver/base.py \
69 $(PATH_SUB_CURRENT)/testdriver/btresolver.py \
70 $(PATH_SUB_CURRENT)/testdriver/reporter.py \
71 $(PATH_SUB_CURRENT)/testdriver/tst-txsclient.py \
72 $(PATH_SUB_CURRENT)/testdriver/txsclient.py \
73 $(PATH_SUB_CURRENT)/testdriver/vbox.py \
74 $(PATH_SUB_CURRENT)/testdriver/vboxcon.py \
75 $(PATH_SUB_CURRENT)/testdriver/vboxtestfileset.py \
76 $(PATH_SUB_CURRENT)/testdriver/vboxtestvms.py \
77 $(PATH_SUB_CURRENT)/testdriver/vboxwrappers.py \
78 $(PATH_SUB_CURRENT)/testdriver/winbase.py \
79 $(PATH_SUB_CURRENT)/testdriver/win-vbox-net-uninstall.ps1
80ValidationKit-testdriver_EXEC_SOURCES := \
81 $(PATH_SUB_CURRENT)/testdriver/vboxinstaller.py
82$(PATH_SUB_CURRENT)/testdriver/txsclient.py_VBOX_PYCHECKER_FLAGS = --no-reimport
83
84
85#
86# Packing target.
87#
88ifndef VBOX_WITHOUT_VALIDATIONKIT_ZIP
89
90 VBOX_VALIDATIONKIT_INSTALLS := $(filter-out $(VBOX_VALIDATIONKIT_INSTALLS), $(INSTALLS))
91
92 #
93 # VBoxValidationKit.zip.
94 # TODO: Don't pack the python stuff multiple times? Lazy works for now.
95 #
96 PACKING += $(PATH_OUT)/VBoxValidationKit.zip
97 $(PATH_OUT)/VBoxValidationKit.zip: \
98 $(VBOX_PATH_VALIDATIONKIT)/VBoxValidationKit.iso \
99 $(VBOX_PATH_VALIDATIONKIT)/ \
100 $$(foreach inst, $$(VBOX_VALIDATIONKIT_INSTALLS), \
101 $$(filter $(PATH_STAGE)/$(INST_VALIDATIONKIT)%, $$($$(inst)_2_STAGE_TARGETS)))
102 $(call MSG_L1,Packing the Test Suite $@)
103 $(QUIET)$(RM) -f $@
104 $(foreach os, darwin freebsd linux os2 solaris win,$(foreach arch, x86 amd64 \
105 ,$(if-expr defined(VBOX_WITH_VALIDATIONKIT_PACKING.$(os).$(arch))\
106 ,$(NLTAB)$(QUIET)$(REDIRECT) -C $(PATH_OUT_BASE)/$(os).$(arch)/$(KBUILD_TYPE)/ \
107 -- $(VBOX_ZIP) -r9 $@ $(INST_VALIDATIONKIT) -x '*.pyc',)))
108
109 #
110 # VBoxTestBoxScript.zip - For setting up the testboxes.
111 #
112 PACKING += $(PATH_OUT)/VBoxTestBoxScript.zip
113 $(PATH_OUT)/VBoxTestBoxScript.zip: \
114 $$(testboxscript_2_STAGE_TARGETS) \
115 $$(testboxscript-common_2_STAGE_TARGETS) \
116 $$(TestBoxHelper_2_STAGE_TARGETS)
117 $(call MSG_L1,Packing the TestBox Script files to $@)
118 $(QUIET)$(RM) -f $@
119 $(foreach os, darwin freebsd linux os2 solaris win,$(foreach arch, x86 amd64 \
120 ,$(if-expr defined(VBOX_WITH_VALIDATIONKIT_PACKING.$(os).$(arch))\
121 ,$(NLTAB)$(QUIET)$(REDIRECT) -C $(PATH_OUT_BASE)/$(os).$(arch)/$(KBUILD_TYPE)/ \
122 -- $(VBOX_ZIP) -r9X $@ $(INST_TESTBOXSCRIPT) -x '*.pyc',)))
123
124endif # !VBOX_WITHOUT_VALIDATIONKIT_ZIP
125
126
127#
128# Automatically lint python code during build.
129#
130if defined(VBOX_WITH_PYLINT) && !defined(VBOX_WITHOUT_AUTO_PYLINT)
131 OTHERS += $(PATH_TARGET)/pylint.run
132 OTHER_CLEAN += $(PATH_TARGET)/pylint.run
133 $(PATH_TARGET)/pylint.run: \
134 $$(filter-out %/testboxscript.o, $$(VBOX_VALIDATIONKIT_PYLINT_TARGETS)) \
135 $$(VBOX_VALIDATIONKIT_PYUNITTEST_TARGETS)
136 $(QUIET)$(APPEND) -t "$@"
137endif
138
139$(evalcall def_vbox_validationkit_process_python_sources,FORCE)
140$(evalcall def_vbox_validationkit_process_js_sources,FORCE)
141include $(FILE_KBUILD_SUB_FOOTER)
142
143
144
145
146#
147# Construct the file spec for creating the Validation Kit guest iso.
148#
149VBOX_VALIDATIONKIT_FILESPEC = \
150 valkit.txt=$(VBOX_PATH_VALIDATIONKIT_SRC)/docs/valkit.txt \
151 $(VBOX_PATH_VALIDATIONKIT)/vboxtxs-readme.txt
152ifneq ($(KBUILD_HOST),os2)
153 VBOX_VALIDATIONKIT_FILESPEC += \
154 $(VBOX_PATH_VALIDATIONKIT)/bootsectors/bootsector-pae.img \
155 $(VBOX_PATH_VALIDATIONKIT)/bootsectors/bootsector-shutdown.img
156endif
157
158# Generate VBOX_PATH_VALIDATIONKIT.os.arch variables.
159$(foreach os, darwin freebsd linux os2 solaris win,$(foreach arch, x86 amd64, \
160 $(eval VBOX_PATH_VALIDATIONKIT.$(os).$(arch) = $(PATH_OUT_BASE)/$(os).$(arch)/$(KBUILD_TYPE)/$(INST_VALIDATIONKIT)$(os)/$(arch)) \
161))
162
163# Common files first.
164define def_vbox_validationkit_common_files
165 ifdef VBOX_WITH_VALIDATIONKIT_PACKING.$(os).$(arch)
166 VBOX_VALIDATIONKIT_FILESPEC += \
167 $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/exceptionsR3$(TMP_SUFF_EXE) \
168 $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/cpu-alloc-all-mem$(TMP_SUFF_EXE) \
169 $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/cpu-numa$(TMP_SUFF_EXE) \
170 $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/FsPerf$(TMP_SUFF_EXE) \
171 $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/NetPerf$(TMP_SUFF_EXE) \
172 $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/LoadGenerator$(TMP_SUFF_EXE) \
173 $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/loadgeneratorR0.r0 \
174 $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/SerialTest$(TMP_SUFF_EXE) \
175 $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/TestExecService$(TMP_SUFF_EXE) \
176 $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/vts_rm$(TMP_SUFF_EXE) \
177 $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/vts_shutdown$(TMP_SUFF_EXE) \
178 $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/vts_tar$(TMP_SUFF_EXE) \
179 $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/xmmsaving$(TMP_SUFF_EXE)
180 endif
181endef
182
183TMP_SUFF_EXE=.exe
184$(foreach os, os2 win,$(foreach arch, x86 amd64, \
185 $(eval $(def_vbox_validationkit_common_files)) \
186))
187TMP_SUFF_EXE=
188$(foreach os, darwin freebsd linux solaris,$(foreach arch, x86 amd64, \
189 $(eval $(def_vbox_validationkit_common_files)) \
190))
191
192# OS specific files - Linux
193ifdef VBOX_WITH_VALIDATIONKIT_PACKING.linux.x86
194 VBOX_VALIDATIONKIT_FILESPEC += \
195 $(VBOX_PATH_VALIDATIONKIT.linux.x86)/UsbTest
196endif
197ifdef VBOX_WITH_VALIDATIONKIT_PACKING.linux.amd64
198 VBOX_VALIDATIONKIT_FILESPEC += \
199 $(VBOX_PATH_VALIDATIONKIT.linux.amd64)/UsbTest
200endif
201ifdef VBOX_WITH_VALIDATIONKIT_PACKING.linux.x86
202 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.linux.x86)/../vboxtxs)
203 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.linux.x86)/../vboxtxs-nat)
204 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.linux.x86)/../vboxtxs.service)
205
206else ifdef VBOX_WITH_VALIDATIONKIT_PACKING.linux.amd64
207 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.linux.amd64)/../vboxtxs)
208 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.linux.amd64)/../vboxtxs-nat)
209 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.linux.amd64)/../vboxtxs.service)
210endif
211
212# OS specific files - OS/2
213ifdef VBOX_WITH_VALIDATIONKIT_PACKING.os2.x86
214 VBOX_VALIDATIONKIT_FILESPEC += \
215 $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc06.dll \
216 $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc061.dll \
217 $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc062.dll \
218 $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc063.dll \
219 $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc064.dll \
220 $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc065.dll \
221 $(VBOX_PATH_VALIDATIONKIT.os2.x86)/libc066.dll
222endif
223
224# OS specific files - Solaris
225ifdef VBOX_WITH_VALIDATIONKIT_PACKING.solaris.x86
226 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.solaris.x86)/../vboxtxs.sh)
227 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.solaris.x86)/../vboxtxs.xml)
228 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.solaris.x86)/../vboxtxs-sol10.xml)
229else ifdef VBOX_WITH_VALIDATIONKIT_PACKING.solaris.amd64
230 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.solaris.amd64)/../vboxtxs.sh)
231 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.solaris.amd64)/../vboxtxs.xml)
232 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.solaris.amd64)/../vboxtxs-sol10.xml)
233endif
234
235# OS specific files - Windows
236ifdef VBOX_WITH_VALIDATIONKIT_PACKING.win.x86
237 VBOX_VALIDATIONKIT_FILESPEC += \
238 $(VBOX_PATH_VALIDATIONKIT.win.x86)/ntSetFreq.exe \
239 $(VBOX_PATH_VALIDATIONKIT.win.x86)/ntTimeSources.exe
240 ifdef VBOX_WITH_AUDIO_VALIDATIONKIT
241 VBOX_VALIDATIONKIT_FILESPEC += \
242 $(VBOX_PATH_VALIDATIONKIT.win.x86)/ntPlayToneWaveX.exe
243 endif
244endif
245ifdef VBOX_WITH_VALIDATIONKIT_PACKING.win.amd64
246 VBOX_VALIDATIONKIT_FILESPEC += \
247 $(VBOX_PATH_VALIDATIONKIT.win.amd64)/ntSetFreq.exe \
248 $(VBOX_PATH_VALIDATIONKIT.win.amd64)/ntTimeSources.exe
249 ifdef VBOX_WITH_AUDIO_VALIDATIONKIT
250 VBOX_VALIDATIONKIT_FILESPEC += \
251 $(VBOX_PATH_VALIDATIONKIT.win.amd64)/ntPlayToneWaveX.exe
252 endif
253endif
254ifdef VBOX_WITH_VALIDATIONKIT_PACKING.win.x86
255 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.x86)/../vboxtxs.cmd)
256 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.x86)/../vboxtxs.reg)
257 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.x86)/../vboxtxs-nat.cmd)
258 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.x86)/../vboxtxs-nat.reg)
259else ifdef VBOX_WITH_VALIDATIONKIT_PACKING.win.amd64
260 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.amd64)/../vboxtxs.cmd)
261 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.amd64)/../vboxtxs.reg)
262 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.amd64)/../vboxtxs-nat.cmd)
263 VBOX_VALIDATIONKIT_FILESPEC += $(abspath $(VBOX_PATH_VALIDATIONKIT.win.amd64)/../vboxtxs-nat.reg)
264endif
265
266
267#
268# Build the Validation Kit guest ISO.
269#
270$(VBOX_PATH_VALIDATIONKIT)/VBoxValidationKit.iso: \
271 $(filter-out %=deleteme=, $(subst =,=deleteme= , $(VBOX_VALIDATIONKIT_FILESPEC))) \
272 $(VBOX_SVN_REV_KMK) \
273 $(VBOX_PATH_VALIDATIONKIT_SRC)/Makefile.kmk \
274 | $(if-expr defined(VBOX_USE_RTISOMAKER),$(VBOX_RTISOMAKER),)
275 $(call MSG_TOOL,RTIsoMaker,,$@)
276 $(QUIET)$(MKDIR) -p $(@D)
277ifneq ($(KBUILD_TARGET),os2)
278 $(QUIET)$(ECHO) VBOX_VALIDATIONKIT_FILESPEC $(VBOX_VALIDATIONKIT_FILESPEC)
279endif
280 $(VBOX_RTISOMAKER) \
281 --output $@ \
282 --iso-level 3 \
283 --rock-ridge \
284 --joliet \
285 --rational-attribs \
286 --random-order-verification 2048 \
287 $(foreach spec,$(VBOX_VALIDATIONKIT_FILESPEC) \
288 ,$(if $(findstring =,$(spec)), $(spec), /$(lastword $(subst /$(INST_VALIDATIONKIT), ,$(spec))=$(spec))) ) \
289 $(foreach spec,$(filter-out %.txt %.dll %.xml %.reg %.img, $(VBOX_VALIDATIONKIT_FILESPEC)) \
290 ,--chmod=a+x:/$(lastword $(if $(findstring =,$(spec)), \
291 $(subst =, $(SP), $(spec)), \
292 $(subst /$(INST_VALIDATIONKIT), ,$(spec))))) \
293 --volume-id "VBOXVALK_$(VBOX_SVN_REV)_$(VBOX_VERSION_STRING_RAW)" \
294 --name-setup joliet \
295 --volume-id "VBoxValK $(VBOX_SVN_REV)"
296
297# Alias for creating the iso.
298.PHONY: validationkit-iso
299validationkit-iso: $(VBOX_PATH_VALIDATIONKIT)/VBoxValidationKit.iso
300
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette