VirtualBox

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

Last change on this file since 49923 was 49906, checked in by vboxsync, 11 years ago

Main: Some simple COM/XPCOM performance measurements. The idea was getting a baseline before experimenting with proxy/stub stuff in midl. There is some VirtualBox.idl preps related to that. Unforuntately, the proxy/stub generator doesn't support SAFEARRAY parameters with interface pointers other than IUnknown. So, we're probably up against something difficult here.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.9 KB
Line 
1# $Id: Makefile.kmk 49906 2013-12-14 21:01:04Z vboxsync $
2## @file
3# Sub-Makefile for the VBox API testcases.
4#
5
6#
7# Copyright (C) 2004-2013 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 tstVBoxAPIPerf \
30 $(if $(VBOX_OSE),,tstOVF) \
31 $(if $(VBOX_WITH_XPCOM),tstVBoxAPIXPCOM,tstVBoxAPIWin) \
32 $(if $(VBOX_WITH_RESOURCE_USAGE_API),tstCollector,) \
33 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlParseBuffer,) \
34 $(if $(VBOX_WITH_GUEST_CONTROL),tstGuestCtrlContextID,) \
35 tstMediumLock \
36 tstMouseImpl
37 PROGRAMS.linux += \
38 $(if $(VBOX_WITH_USB),tstUSBProxyLinux,)
39 endif # !VBOX_WITH_TESTCASES
40endif # !VBOX_ONLY_SDK
41if defined(VBOX_ONLY_SDK) || !defined(VBOX_WITH_XPCOM)
42 INSTALLS += samplesMSCOM
43endif
44if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_XPCOM)
45 INSTALLS += samplesXPCOM
46endif
47
48
49#
50# The samples
51#
52samplesMSCOM_MODE = a+r,u+w
53samplesMSCOM_INST = $(INST_SDK)bindings/mscom/samples/
54samplesMSCOM_SOURCES = tstVBoxAPIWin.cpp makefile.tstVBoxAPIWin=>Makefile
55
56samplesXPCOM_MODE = a+r,u+w
57samplesXPCOM_INST = $(INST_SDK)bindings/xpcom/samples/
58samplesXPCOM_SOURCES = tstVBoxAPIXPCOM.cpp makefile.tstVBoxAPIXPCOM=>Makefile
59
60
61#
62# tstAPI
63#
64tstAPI_TEMPLATE = VBOXMAINCLIENTTSTEXE
65#tstAPI_INST = $(INST_SDK)bindings/gluecom/samples/
66tstAPI_SOURCES = tstAPI.cpp
67
68
69#
70# tstVBoxAPIPerf
71#
72tstVBoxAPIPerf_TEMPLATE = VBOXMAINCLIENTTSTEXE
73tstVBoxAPIPerf_SOURCES = \
74 tstVBoxAPIPerf.cpp
75
76#
77# tstOVF
78#
79tstOVF_TEMPLATE = VBOXMAINCLIENTTSTEXE
80#tstOVF_INST = $(INST_SDK)bindings/gluecom/samples/
81tstOVF_SOURCES = tstOVF.cpp
82
83ifndef VBOX_OSE
84#
85# OVF test data.
86#
87INSTALLS += ovf-testcases
88ovf-testcases_MODE = a+r,u+w
89ovf-testcases_INST = $(INST_BIN)ovf-testcases/
90ovf-testcases_SOURCES = \
91 ovf-dummy.vmdk \
92 ovf-joomla-0.9/joomla-1.1.4-ovf.ovf=>ovf-joomla-0.9/joomla-1.1.4-ovf.ovf \
93 ovf-winhost-audio-nodisks/WinXP.ovf=>ovf-winhost-audio-nodisks/WinXP.ovf \
94 ovf-winxp-vbox-sharedfolders/winxp.ovf=>ovf-winxp-vbox-sharedfolders/winxp.ovf
95endif
96
97
98#
99# tstVBoxAPIXPCOM
100#
101# We only build the testcase here to make sure it builds.
102# It comes with a custom makefile which should be tested as well!
103#
104tstVBoxAPIXPCOM_TEMPLATE = VBOXMAINCLIENTTSTEXE
105tstVBoxAPIXPCOM_SOURCES = tstVBoxAPIXPCOM.cpp
106
107
108#
109# tstVBoxAPIWin
110#
111tstVBoxAPIWin_TEMPLATE = VBOXMAINCLIENTTSTEXE
112tstVBoxAPIWin_SOURCES = \
113 tstVBoxAPIWin.cpp \
114 $(VBOX_PATH_SDK)/bindings/mscom/lib/VirtualBox_i.c
115
116
117#
118# tstCollector
119#
120# Note! VBOX_MAIN_APIWRAPPER_GEN_HDRS is only defined if kmk is executed a
121# parent directory. Since the rules for generating the files listed by
122# the variable lives in the parent makefile, this is not a problem.
123#
124tstCollector_TEMPLATE = VBOXMAINCLIENTTSTEXE
125tstCollector_SOURCES = \
126 tstCollector.cpp \
127 ../src-server/Performance.cpp
128tstCollector_INCS = \
129 ../include \
130 $(VBOX_MAIN_APIWRAPPER_INCS)
131tstCollector_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
132tstCollector_DEFS = VBOX_COLLECTOR_TEST_CASE
133tstCollector_LDFLAGS.darwin = -lproc
134tstCollector_LDFLAGS.solaris = -lkstat -lnvpair
135tstCollector_LDFLAGS.win = psapi.lib powrprof.lib
136
137
138#
139# tstGuestCtrlParseBuffer
140#
141tstGuestCtrlParseBuffer_TEMPLATE = VBOXMAINCLIENTTSTEXE
142tstGuestCtrlParseBuffer_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
143tstGuestCtrlParseBuffer_SOURCES = \
144 tstGuestCtrlParseBuffer.cpp \
145 ../src-client/GuestCtrlPrivate.cpp
146tstGuestCtrlParseBuffer_INCS = ../include
147
148
149#
150# tstGuestCtrlContextID
151#
152tstGuestCtrlContextID_TEMPLATE = VBOXMAINCLIENTTSTEXE
153tstGuestCtrlContextID_DEFS += VBOX_WITH_HGCM VBOX_WITH_GUEST_CONTROL VBOX_GUESTCTRL_TEST_CASE
154tstGuestCtrlContextID_SOURCES = \
155 tstGuestCtrlContextID.cpp \
156 ../src-client/GuestCtrlPrivate.cpp
157tstGuestCtrlContextID_INCS = ../include
158
159
160#
161# tstUSBProxyLinux
162#
163tstUSBProxyLinux_TEMPLATE = VBOXR3TSTNPEXE
164tstUSBProxyLinux_SOURCES = \
165 tstUSBProxyLinux.cpp \
166 ../src-server/linux/USBProxyServiceLinux.cpp \
167 ../src-server/linux/USBGetDevices.cpp
168tstUSBProxyLinux_INCS = \
169 . \
170 ../include \
171 $(VBOX_PATH_SDK)/bindings/xpcom/include \
172 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
173 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom
174tstUSBProxyLinux_DEFS = \
175 UNIT_TEST \
176 VBOX_WITH_USB \
177 VBOX_USB_WITH_SYSFS \
178 VBOX_WITH_XPCOM
179tstUSBProxyLinux_DEPS = \
180 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
181tstUSBProxyLinux_LIBS += \
182 $(PATH_OUT)/lib/USBLib.a \
183 $(PATH_OUT)/lib/VBoxCOM.a
184
185
186#
187# tstMediumLock
188#
189tstMediumLock_TEMPLATE = VBOXMAINCLIENTTSTEXE
190tstMediumLock_SOURCES = tstMediumLock.cpp
191
192
193#
194# tstMouseImpl
195#
196tstMouseImpl_TEMPLATE = VBOXMAINTSTEXE
197tstMouseImpl_SOURCES = \
198 tstMouseImpl.cpp \
199 ../src-client/MouseImpl.cpp \
200 ../src-all/EventImpl.cpp \
201 ../src-all/VirtualBoxBase.cpp \
202 ../src-all/VirtualBoxErrorInfoImpl.cpp \
203 $(VBOX_AUTOGEN_EVENT_CPP) \
204 $(VBOX_XML_SCHEMADEFS_CPP)
205tstMouseImpl_INCS = ../include \
206 $(VBOX_PATH_SDK)/bindings/xpcom/include \
207 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
208 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
209 $(dir $(VBOX_XML_SCHEMADEFS_H))
210tstMouseImpl_LIBS = \
211 $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB) \
212 $(LIB_VMM)
213# Super ugly hack to make the code work well enough without having ATL/COM
214# completely initialized, without it there are crashes caused by ComObjPtr
215# and many other pieces of glue code, as the inproc code path is more picky.
216tstMouseImpl_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
217
218
219# generate rules.
220include $(FILE_KBUILD_SUB_FOOTER)
221
Note: See TracBrowser for help on using the repository browser.

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