VirtualBox

source: vbox/trunk/src/VBox/Main/testcase/Makefile.kmk@ 100111

Last change on this file since 100111 was 99770, checked in by vboxsync, 19 months ago

VBox/com: Added SafeArray::push_front() and implemented a new (initial) testcase for the SafeArray glue code.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.7 KB
Line 
1# $Id: Makefile.kmk 99770 2023-05-12 09:27:23Z vboxsync $
2## @file
3# Sub-Makefile for the VBox API testcases.
4#
5
6#
7# Copyright (C) 2004-2023 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28SUB_DEPTH = ../../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31
32#
33# Target and globals (small mess)
34#
35ifndef VBOX_ONLY_SDK
36 if defined(VBOX_WITH_TESTCASES)
37 PROGRAMS += \
38 tstAPI \
39 tstVBoxAPI \
40 tstVBoxAPIPerf \
41 tstVBoxMultipleVM \
42 $(if $(VBOX_OSE),,tstOVF) \
43 $(if $(VBOX_WITH_XPCOM),tstVBoxAPIXPCOM,tstVBoxAPIWin msiDarwinDescriptorDecoder) \
44 $(if $(VBOX_WITH_RESOURCE_USAGE_API),tstCollector,) \
45 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlContextID,) \
46 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlParseBuffer,) \
47 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlPaths,) \
48 tstMediumLock \
49 tstSafeArray \
50 tstBstr \
51 tstGuid \
52 tstUnattendedScript \
53 tstVBoxCrypto
54 PROGRAMS.linux += \
55 $(if $(VBOX_WITH_USB),tstUSBProxyLinux,)
56 endif # !VBOX_WITH_TESTCASES
57endif # !VBOX_ONLY_SDK
58if defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
59 INSTALLS += samplesMSCOM
60endif
61if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
62 INSTALLS += samplesXPCOM
63endif
64
65
66#
67# The samples
68#
69samplesMSCOM_MODE = a+r,u+w
70samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
71samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp makefile.tstVBoxAPIWin=>Makefile
72
73samplesXPCOM_MODE = a+r,u+w
74samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
75samplesXPCOM_SOURCES = tstVBoxAPIXPCOM.cpp makefile.tstVBoxAPIXPCOM=>Makefile
76
77#
78# tstVBoxMultipleVM
79#
80tstVBoxMultipleVM_TEMPLATE = VBoxMainClientTstExe
81tstVBoxMultipleVM_SOURCES = tstVBoxMultipleVM.cpp
82
83#
84# tstAPI
85#
86tstAPI_TEMPLATE = VBoxMainClientTstExe
87#tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
88tstAPI_SOURCES = tstAPI.cpp
89
90#
91# tstVBoxAPI
92#
93tstVBoxAPI_TEMPLATE = VBoxMainClientTstExe
94tstVBoxAPI_SOURCES = \
95 tstVBoxAPI.cpp
96
97#
98# tstVBoxAPIPerf
99#
100tstVBoxAPIPerf_TEMPLATE = VBoxMainClientTstExe
101tstVBoxAPIPerf_SOURCES = \
102 tstVBoxAPIPerf.cpp
103
104#
105# tstOVF
106#
107tstOVF_TEMPLATE = VBoxMainClientTstExe
108#tstOVF_INST = $(INST_SDK)bindings/gluecom/samples/
109tstOVF_SOURCES = tstOVF.cpp
110
111ifndef VBOX_OSE
112 #
113 # OVF test data.
114 #
115 INSTALLS += ovf-testcases
116 ovf-testcases_MODE = a+r,u+w
117 ovf-testcases_INST = $(INST_TESTCASE)ovf-testcases/
118 ovf-testcases_SOURCES = \
119 ovf-dummy.vmdk \
120 ovf-joomla-0.9/joomla-1.1.4-ovf.ovf=>ovf-joomla-0.9/joomla-1.1.4-ovf.ovf \
121 ovf-winhost-audio-nodisks/WinXP.ovf=>ovf-winhost-audio-nodisks/WinXP.ovf \
122 ovf-winxp-vbox-sharedfolders/winxp.ovf=>ovf-winxp-vbox-sharedfolders/winxp.ovf
123endif
124
125
126#
127# tstVBoxAPIXPCOM
128#
129# We only build the testcase here to make sure it builds.
130# It comes with a custom makefile which should be tested as well!
131#
132# Use very generic template to make the build environment similar
133# to the standalone case, to detect if IPRT or glue use sneaks in.
134#
135tstVBoxAPIXPCOM_TEMPLATE = VBoxR3Exe
136tstVBoxAPIXPCOM_INST = $(INST_TESTCASE)
137tstVBoxAPIXPCOM_SOURCES = tstVBoxAPIXPCOM.cpp
138tstVBoxAPIXPCOM_INCS = \
139 $(VBOX_PATH_SDK)/bindings/xpcom/include \
140 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
141 $(VBOX_PATH_SDK)/bindings/xpcom/include/string \
142 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
143 $(VBOX_PATH_SDK)/bindings/xpcom/include/ipcd
144tstVBoxAPIXPCOM_LIBS = \
145 $(LIB_XPCOM) \
146 $(LIB_RUNTIME)
147tstVBoxAPIXPCOM_CXXFLAGS = -fshort-wchar
148ifdef VBOX_WITH_RUNPATH
149 tstVBoxAPIXPCOM_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' $(TEMPLATE_VBoxBldProg_LDFLAGS)
150else ifdef VBOX_WITH_RELATIVE_RUNPATH
151 tstVBoxAPIXPCOM_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..' $(TEMPLATE_VBoxBldProg_LDFLAGS)
152endif
153tstVBoxAPIXPCOM_INTERMEDIATES = \
154 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
155ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
156 tstVBoxAPIXPCOM_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
157endif
158
159
160#
161# tstVBoxAPIWin
162#
163# Use very generic template to make the build environment similar
164# to the standalone case, to detect if IPRT or glue use sneaks in.
165#
166tstVBoxAPIWin_TEMPLATE = VBoxR3Exe
167tstVBoxAPIWin_INST = $(INST_TESTCASE)
168tstVBoxAPIWin_SOURCES = \
169 tstVBoxAPIWin.cpp \
170 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
171tstVBoxAPIWin_INCS = \
172 $(VBOX_PATH_SDK)/bindings/mscom/include
173tstVBoxAPIWin_INTERMEDIATES = \
174 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
175
176
177#
178# msiDarwinDescriptorDecoder
179#
180# Use very generic template to make the build environment similar
181# to the standalone case, to detect if IPRT or glue use sneaks in.
182#
183msiDarwinDescriptorDecoder_TEMPLATE = VBoxR3Exe
184msiDarwinDescriptorDecoder_INST = $(VBOX_INST_TOOLS)
185msiDarwinDescriptorDecoder_SOURCES = \
186 msiDarwinDescriptorDecoder.cpp
187
188
189#
190# tstCollector
191#
192# Note! VBOX_MAIN_APIWRAPPER_GEN_HDRS is only defined if kmk is executed a
193# parent directory. Since the rules for generating the files listed by
194# the variable lives in the parent makefile, this is not a problem.
195#
196tstCollector_TEMPLATE = VBoxMainClientTstExe
197tstCollector_SOURCES = \
198 tstCollector.cpp \
199 ../src-server/Performance.cpp
200tstCollector_INCS = \
201 ../include \
202 $(VBOX_MAIN_APIWRAPPER_INCS)
203tstCollector_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
204tstCollector_DEFS = VBOX_COLLECTOR_TEST_CASE
205tstCollector_LDFLAGS.darwin = -lproc
206tstCollector_LDFLAGS.solaris = -lkstat -lnvpair
207tstCollector_LDFLAGS.win = psapi.lib powrprof.lib
208
209
210#
211# tstGuestCtrlContextID
212#
213tstGuestCtrlContextID_TEMPLATE = VBoxMainClientTstExe
214tstGuestCtrlContextID_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
215tstGuestCtrlContextID_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
216tstGuestCtrlContextID_SOURCES = \
217 tstGuestCtrlContextID.cpp \
218 ../src-client/GuestCtrlPrivate.cpp
219tstGuestCtrlContextID_INCS = ../include \
220 $(VBOX_MAIN_APIWRAPPER_INCS)
221
222
223#
224# tstGuestCtrlParseBuffer
225#
226tstGuestCtrlParseBuffer_TEMPLATE = VBoxMainClientTstExe
227tstGuestCtrlParseBuffer_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
228tstGuestCtrlParseBuffer_DEFS += VBOX_WITH_HGCM VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
229tstGuestCtrlParseBuffer_SOURCES = \
230 tstGuestCtrlParseBuffer.cpp \
231 ../src-client/GuestCtrlPrivate.cpp
232tstGuestCtrlParseBuffer_INCS = ../include \
233 $(VBOX_MAIN_APIWRAPPER_INCS)
234
235
236#
237# tstGuestCtrlPaths
238#
239tstGuestCtrlPaths_TEMPLATE = VBoxMainClientTstExe
240tstGuestCtrlPaths_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
241tstGuestCtrlPaths_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
242tstGuestCtrlPaths_SOURCES = \
243 tstGuestCtrlPaths.cpp \
244 ../src-client/GuestCtrlPrivate.cpp
245tstGuestCtrlPaths_INCS = ../include \
246 $(VBOX_MAIN_APIWRAPPER_INCS)
247
248if 0 # Enable this if you want automatic runs after compilation.
249 $$(tstGuestCtrlPaths_0_OUTDIR)/tstGuestCtrlPaths.run: $$(tstGuestCtrlPaths_1_STAGE_TARGET)
250 export VBOX_LOG_DEST=nofile; $(tstGuestCtrlPaths_1_STAGE_TARGET) quiet
251 $(QUIET)$(APPEND) -t "$@" "done"
252 OTHERS += $(tstGuestCtrlPaths_0_OUTDIR)/tstGuestCtrlPaths.run
253endif
254
255
256#
257# tstUSBProxyLinux
258#
259tstUSBProxyLinux_TEMPLATE = VBoxMainClientTstExe
260tstUSBProxyLinux_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
261tstUSBProxyLinux_SOURCES = \
262 tstUSBProxyLinux.cpp \
263 ../src-server/linux/USBGetDevices.cpp
264tstUSBProxyLinux_INCS = \
265 . \
266 ../include \
267 $(VBOX_PATH_SDK)/bindings/xpcom/include \
268 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
269 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
270 $(VBOX_MAIN_APIWRAPPER_INCS)
271tstUSBProxyLinux_DEFS = \
272 UNIT_TEST \
273 VBOX_WITH_USB \
274 VBOX_USB_WITH_SYSFS \
275 VBOX_WITH_XPCOM
276tstUSBProxyLinux_DEPS = \
277 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
278tstUSBProxyLinux_LIBS += \
279 $(PATH_OUT)/lib/USBLib.a \
280 $(PATH_OUT)/lib/VBoxCOM.a
281
282
283#
284# tstMediumLock
285#
286tstMediumLock_TEMPLATE = VBoxMainClientTstExe
287tstMediumLock_SOURCES = tstMediumLock.cpp
288
289
290#
291# tstSafeArray
292#
293tstSafeArray_TEMPLATE = VBoxMainClientTstExe
294tstSafeArray_SOURCES = tstSafeArray.cpp
295
296
297#
298# tstBstr
299#
300tstBstr_TEMPLATE = VBoxMainClientTstExe
301tstBstr_SOURCES = tstBstr.cpp
302
303
304#
305# tstGuid
306#
307tstGuid_TEMPLATE = VBoxMainClientTstExe
308tstGuid_SOURCES = tstGuid.cpp
309
310
311#
312# tstUnattendedScript
313#
314tstUnattendedScript_TEMPLATE = VBoxMainClientTstExe
315tstUnattendedScript_DEFS = VBOX_WITH_UNATTENDED IN_VBOXSVC IN_TST_UNATTENDED_SCRIPT
316tstUnattendedScript_INTERMEDIATES = \
317 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS) \
318 $(VBOX_XML_SCHEMADEFS_H)
319tstUnattendedScript_INCS = \
320 ../include \
321 $(VBOX_MAIN_APIWRAPPER_INCS) \
322 $(dir $(VBOX_XML_SCHEMADEFS_H))
323tstUnattendedScript_SOURCES = \
324 tstUnattendedScript.cpp \
325 ../src-server/UnattendedScript.cpp \
326 ../src-all/TextScript.cpp \
327 ../src-all/VirtualBoxBase.cpp \
328 ../src-all/VirtualBoxErrorInfoImpl.cpp \
329 ../src-all/AutoCaller.cpp \
330 ../src-all/GlobalStatusConversion.cpp
331tstUnattendedScript_LIBS = \
332 $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB)
333
334INSTALLS += tstUnattendedScriptFiles
335tstUnattendedScriptFiles_TEMPLATE = VBoxMainTstExe
336tstUnattendedScriptFiles_SOURCES = \
337 tstUnattendedScript-1.template \
338 tstUnattendedScript-1.expected
339
340
341#
342# tstVBoxCrypto
343#
344tstVBoxCrypto_TEMPLATE = VBoxMainClientTstExe
345tstVBoxCrypto_SOURCES = tstVBoxCrypto.cpp
346
347
348
349# generate rules.
350include $(FILE_KBUILD_SUB_FOOTER)
351
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