VirtualBox

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

Last change on this file since 93404 was 93404, checked in by vboxsync, 3 years ago

Main/testcase: Corrected TEMPLATE for tstUnattendedScriptFiles. bugref:9781

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.4 KB
Line 
1# $Id: Makefile.kmk 93404 2022-01-22 23:30:11Z vboxsync $
2## @file
3# Sub-Makefile for the VBox API testcases.
4#
5
6#
7# Copyright (C) 2004-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
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21
22#
23# Target and globals (small mess)
24#
25ifndef VBOX_ONLY_SDK
26 if defined(VBOX_WITH_TESTCASES)
27 PROGRAMS += \
28 tstAPI \
29 tstVBoxAPI \
30 tstVBoxAPIPerf \
31 tstVBoxMultipleVM \
32 $(if $(VBOX_OSE),,tstOVF) \
33 $(if $(VBOX_WITH_XPCOM),tstVBoxAPIXPCOM,tstVBoxAPIWin msiDarwinDescriptorDecoder) \
34 $(if $(VBOX_WITH_RESOURCE_USAGE_API),tstCollector,) \
35 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlParseBuffer,) \
36 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlContextID,) \
37 tstMediumLock \
38 tstBstr \
39 tstGuid \
40 tstUnattendedScript
41 PROGRAMS.linux += \
42 $(if $(VBOX_WITH_USB),tstUSBProxyLinux,)
43 endif # !VBOX_WITH_TESTCASES
44endif # !VBOX_ONLY_SDK
45if defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
46 INSTALLS += samplesMSCOM
47endif
48if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
49 INSTALLS += samplesXPCOM
50endif
51
52
53#
54# The samples
55#
56samplesMSCOM_MODE = a+r,u+w
57samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
58samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp makefile.tstVBoxAPIWin=>Makefile
59
60samplesXPCOM_MODE = a+r,u+w
61samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
62samplesXPCOM_SOURCES = tstVBoxAPIXPCOM.cpp makefile.tstVBoxAPIXPCOM=>Makefile
63
64#
65# tstVBoxMultipleVM
66#
67tstVBoxMultipleVM_TEMPLATE = VBOXMAINCLIENTTSTEXE
68tstVBoxMultipleVM_SOURCES = tstVBoxMultipleVM.cpp
69
70#
71# tstAPI
72#
73tstAPI_TEMPLATE = VBOXMAINCLIENTTSTEXE
74#tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
75tstAPI_SOURCES = tstAPI.cpp
76
77#
78# tstVBoxAPI
79#
80tstVBoxAPI_TEMPLATE = VBOXMAINCLIENTTSTEXE
81tstVBoxAPI_SOURCES = \
82 tstVBoxAPI.cpp
83
84#
85# tstVBoxAPIPerf
86#
87tstVBoxAPIPerf_TEMPLATE = VBOXMAINCLIENTTSTEXE
88tstVBoxAPIPerf_SOURCES = \
89 tstVBoxAPIPerf.cpp
90
91#
92# tstOVF
93#
94tstOVF_TEMPLATE = VBOXMAINCLIENTTSTEXE
95#tstOVF_INST = $(INST_SDK)bindings/gluecom/samples/
96tstOVF_SOURCES = tstOVF.cpp
97
98ifndef VBOX_OSE
99#
100# OVF test data.
101#
102INSTALLS += ovf-testcases
103ovf-testcases_MODE = a+r,u+w
104ovf-testcases_INST = $(INST_TESTCASE)ovf-testcases/
105ovf-testcases_SOURCES = \
106 ovf-dummy.vmdk \
107 ovf-joomla-0.9/joomla-1.1.4-ovf.ovf=>ovf-joomla-0.9/joomla-1.1.4-ovf.ovf \
108 ovf-winhost-audio-nodisks/WinXP.ovf=>ovf-winhost-audio-nodisks/WinXP.ovf \
109 ovf-winxp-vbox-sharedfolders/winxp.ovf=>ovf-winxp-vbox-sharedfolders/winxp.ovf
110endif
111
112
113#
114# tstVBoxAPIXPCOM
115#
116# We only build the testcase here to make sure it builds.
117# It comes with a custom makefile which should be tested as well!
118#
119# Use very generic template to make the build environment similar
120# to the standalone case, to detect if IPRT or glue use sneaks in.
121#
122tstVBoxAPIXPCOM_TEMPLATE = VBOXR3EXE
123tstVBoxAPIXPCOM_INST = $(INST_TESTCASE)
124tstVBoxAPIXPCOM_SOURCES = tstVBoxAPIXPCOM.cpp
125tstVBoxAPIXPCOM_INCS = \
126 $(VBOX_PATH_SDK)/bindings/xpcom/include \
127 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
128 $(VBOX_PATH_SDK)/bindings/xpcom/include/string \
129 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
130 $(VBOX_PATH_SDK)/bindings/xpcom/include/ipcd
131tstVBoxAPIXPCOM_LIBS = \
132 $(LIB_XPCOM) \
133 $(LIB_RUNTIME)
134tstVBoxAPIXPCOM_CXXFLAGS = -fshort-wchar
135ifdef VBOX_WITH_RUNPATH
136 tstVBoxAPIXPCOM_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' $(TEMPLATE_VBoxBldProg_LDFLAGS)
137else ifdef VBOX_WITH_RELATIVE_RUNPATH
138 tstVBoxAPIXPCOM_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..' $(TEMPLATE_VBoxBldProg_LDFLAGS)
139endif
140tstVBoxAPIXPCOM_INTERMEDIATES = \
141 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
142ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
143 tstVBoxAPIXPCOM_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
144endif
145
146
147#
148# tstVBoxAPIWin
149#
150# Use very generic template to make the build environment similar
151# to the standalone case, to detect if IPRT or glue use sneaks in.
152#
153tstVBoxAPIWin_TEMPLATE = VBOXR3EXE
154tstVBoxAPIWin_INST = $(INST_TESTCASE)
155tstVBoxAPIWin_SOURCES = \
156 tstVBoxAPIWin.cpp \
157 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
158tstVBoxAPIWin_INCS = \
159 $(VBOX_PATH_SDK)/bindings/mscom/include
160tstVBoxAPIWin_INTERMEDIATES = \
161 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
162
163
164#
165# msiDarwinDescriptorDecoder
166#
167# Use very generic template to make the build environment similar
168# to the standalone case, to detect if IPRT or glue use sneaks in.
169#
170msiDarwinDescriptorDecoder_TEMPLATE = VBOXR3EXE
171msiDarwinDescriptorDecoder_INST = $(VBOX_INST_TOOLS)
172msiDarwinDescriptorDecoder_SOURCES = \
173 msiDarwinDescriptorDecoder.cpp
174
175
176#
177# tstCollector
178#
179# Note! VBOX_MAIN_APIWRAPPER_GEN_HDRS is only defined if kmk is executed a
180# parent directory. Since the rules for generating the files listed by
181# the variable lives in the parent makefile, this is not a problem.
182#
183tstCollector_TEMPLATE = VBOXMAINCLIENTTSTEXE
184tstCollector_SOURCES = \
185 tstCollector.cpp \
186 ../src-server/Performance.cpp
187tstCollector_INCS = \
188 ../include \
189 $(VBOX_MAIN_APIWRAPPER_INCS)
190tstCollector_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
191tstCollector_DEFS = VBOX_COLLECTOR_TEST_CASE
192tstCollector_LDFLAGS.darwin = -lproc
193tstCollector_LDFLAGS.solaris = -lkstat -lnvpair
194tstCollector_LDFLAGS.win = psapi.lib powrprof.lib
195
196
197#
198# tstGuestCtrlParseBuffer
199#
200tstGuestCtrlParseBuffer_TEMPLATE = VBOXMAINCLIENTTSTEXE
201tstGuestCtrlParseBuffer_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
202tstGuestCtrlParseBuffer_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
203tstGuestCtrlParseBuffer_SOURCES = \
204 tstGuestCtrlParseBuffer.cpp \
205 ../src-client/GuestCtrlPrivate.cpp
206tstGuestCtrlParseBuffer_INCS = ../include \
207 $(VBOX_MAIN_APIWRAPPER_INCS)
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# tstUSBProxyLinux
225#
226tstUSBProxyLinux_TEMPLATE = VBOXMAINCLIENTTSTEXE
227tstUSBProxyLinux_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
228tstUSBProxyLinux_SOURCES = \
229 tstUSBProxyLinux.cpp \
230 ../src-server/linux/USBGetDevices.cpp
231tstUSBProxyLinux_INCS = \
232 . \
233 ../include \
234 $(VBOX_PATH_SDK)/bindings/xpcom/include \
235 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
236 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
237 $(VBOX_MAIN_APIWRAPPER_INCS)
238tstUSBProxyLinux_DEFS = \
239 UNIT_TEST \
240 VBOX_WITH_USB \
241 VBOX_USB_WITH_SYSFS \
242 VBOX_WITH_XPCOM
243tstUSBProxyLinux_DEPS = \
244 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
245tstUSBProxyLinux_LIBS += \
246 $(PATH_OUT)/lib/USBLib.a \
247 $(PATH_OUT)/lib/VBoxCOM.a
248
249
250#
251# tstMediumLock
252#
253tstMediumLock_TEMPLATE = VBOXMAINCLIENTTSTEXE
254tstMediumLock_SOURCES = tstMediumLock.cpp
255
256
257#
258# tstBstr
259#
260tstBstr_TEMPLATE = VBOXMAINCLIENTTSTEXE
261tstBstr_SOURCES = tstBstr.cpp
262
263
264#
265# tstGuid
266#
267tstGuid_TEMPLATE = VBOXMAINCLIENTTSTEXE
268tstGuid_SOURCES = tstGuid.cpp
269
270
271#
272# tstUnattendedScript
273#
274tstUnattendedScript_TEMPLATE = VBOXMAINCLIENTTSTEXE
275tstUnattendedScript_DEFS = VBOX_WITH_UNATTENDED IN_VBOXSVC IN_TST_UNATTENDED_SCRIPT
276tstUnattendedScript_INTERMEDIATES = \
277 $(VBOX_MAIN_APIWRAPPER_GEN_HDRS) \
278 $(VBOX_XML_SCHEMADEFS_H)
279tstUnattendedScript_INCS = \
280 ../include \
281 $(VBOX_MAIN_APIWRAPPER_INCS) \
282 $(dir $(VBOX_XML_SCHEMADEFS_H))
283tstUnattendedScript_SOURCES = \
284 tstUnattendedScript.cpp \
285 ../src-server/UnattendedScript.cpp \
286 ../src-all/TextScript.cpp \
287 ../src-all/VirtualBoxBase.cpp \
288 ../src-all/VirtualBoxErrorInfoImpl.cpp \
289 ../src-all/AutoCaller.cpp \
290 ../src-all/GlobalStatusConversion.cpp
291tstUnattendedScript_LIBS = \
292 $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB)
293
294INSTALLS += tstUnattendedScriptFiles
295tstUnattendedScriptFiles_TEMPLATE = VBOXMAINTSTEXE
296tstUnattendedScriptFiles_SOURCES = \
297 tstUnattendedScript-1.template \
298 tstUnattendedScript-1.expected
299
300
301
302# generate rules.
303include $(FILE_KBUILD_SUB_FOOTER)
304
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