VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedClipboard/testcase/Makefile.kmk@ 100450

Last change on this file since 100450 was 100388, checked in by vboxsync, 17 months ago

Shared Clipboard: Linux build fixes. bugref:9437

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.2 KB
Line 
1# $Id: Makefile.kmk 100388 2023-07-05 12:35:45Z vboxsync $
2## @file
3# Sub-Makefile for the Shared Clipboard Host Service testcases.
4#
5
6#
7# Copyright (C) 2011-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
31if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
32
33 #
34 # Testcase which mocks HGCM to also test the VbglR3-side of Shared Clipboard.
35 #
36 # Goal is to use and test as much guest side code as possible as a self-contained
37 # binary on the host here.
38 #
39 # Note: No #ifdef TESTCASE hacks or similar allowed, has to run
40 # without #ifdef modifications to the core code!
41 #
42 tstClipboardMockHGCM_TEMPLATE = VBoxR3TstExe
43 tstClipboardMockHGCM_DEFS = VBOX_WITH_HGCM VBOX_WITH_SHARED_CLIPBOARD
44 tstClipboardMockHGCM_SOURCES = \
45 tstClipboardMockHGCM.cpp \
46 ../VBoxSharedClipboardSvc.cpp \
47 ../../testcase/TstHGCMMock.cpp \
48 ../../testcase/TstHGCMMockUtils.cpp \
49 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
50 $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibClipboard.cpp \
51 $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp
52 tstClipboardMockHGCM_LIBS = $(LIB_RUNTIME)
53
54 if1of ($(KBUILD_TARGET), linux solaris)
55 PROGRAMS += tstClipboardMockHGCM
56 tstClipboardMockHGCM_SOURCES += \
57 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
58 ../VBoxSharedClipboardSvc-x11.cpp
59 tstClipboardMockHGCM_LIBPATH = \
60 $(VBOX_LIBPATH_X11)
61 tstClipboardMockHGCM_LIBS += \
62 Xt \
63 X11
64 endif
65 if1of ($(KBUILD_TARGET), win)
66 PROGRAMS += tstClipboardMockHGCM
67 tstClipboardMockHGCM_SOURCES += \
68 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp \
69 ../VBoxSharedClipboardSvc-win.cpp
70 endif
71
72 tstClipboardMockHGCM_CLEAN = $(tstClipboardMockHGCM_0_OUTDIR)/tstClipboardMockHGCM.run
73
74 if defined(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS)
75 tstClipboardMockHGCM_DEFS += \
76 VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS \
77 $(if $(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP),VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP,)
78 tstClipboardMockHGCM_SOURCES += \
79 ../VBoxSharedClipboardSvc-transfers.cpp \
80 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
81 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-provider-local.cpp
82 if VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
83 tstClipboardMockHGCM_SOURCES.linux += \
84 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-http.cpp
85 endif
86 tstClipboardMockHGCM_SOURCES.win += \
87 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp \
88 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardEnumFormatEtcImpl-win.cpp \
89 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardStreamImpl-win.cpp
90 endif
91
92 if 0 # Enable this if you want automatic runs after compilation.
93 $$(tstClipboardMockHGCM_0_OUTDIR)/tstClipboardMockHGCM.run: $$(tstClipboardMockHGCM_1_STAGE_TARGET)
94 export VBOX_LOG_DEST=nofile; $(tstClipboardMockHGCM_1_STAGE_TARGET) quiet
95 $(QUIET)$(APPEND) -t "$@" "done"
96 OTHERS += $(tstClipboardMockHGCM_0_OUTDIR)/tstClipboardMockHGCM.run
97 endif
98
99 #
100 #
101 #
102 PROGRAMS += tstClipboardServiceHost
103 tstClipboardServiceHost_TEMPLATE = VBoxR3TstExe
104 tstClipboardServiceHost_DEFS = VBOX_WITH_HGCM UNIT_TEST
105 tstClipboardServiceHost_SOURCES = \
106 ../VBoxSharedClipboardSvc.cpp \
107 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
108 $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
109 tstClipboardServiceHost.cpp
110 tstClipboardServiceHost_LIBS = $(LIB_RUNTIME)
111 tstClipboardServiceHost_CLEAN = $(tstClipboardServiceHost_0_OUTDIR)/tstClipboardServiceHost.run
112
113 if defined(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS)
114 tstClipboardServiceHost_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
115 tstClipboardServiceHost_SOURCES += \
116 ../VBoxSharedClipboardSvc-transfers.cpp \
117 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
118 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-provider-local.cpp
119 endif
120
121 #
122 #
123 #
124 PROGRAMS += tstClipboardServiceImpl
125 tstClipboardServiceImpl_TEMPLATE = VBoxR3TstExe
126 tstClipboardServiceImpl_DEFS = VBOX_WITH_HGCM UNIT_TEST
127 tstClipboardServiceImpl_SOURCES = \
128 ../VBoxSharedClipboardSvc.cpp \
129 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
130 $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
131 tstClipboardServiceImpl.cpp
132 tstClipboardServiceImpl_SOURCES.win = \
133 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp
134 tstClipboardServiceImpl_LIBS = $(LIB_RUNTIME)
135 tstClipboardServiceImpl_CLEAN = $(tstClipboardServiceImpl_0_OUTDIR)/tstClipboardServiceImpl.run
136
137 if defined(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS)
138 #
139 #
140 #
141 PROGRAMS += tstClipboardTransfers
142 tstClipboardTransfers_TEMPLATE = VBoxR3TstExe
143 tstClipboardTransfers_DEFS = VBOX_WITH_HGCM UNIT_TEST VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
144 tstClipboardTransfers_SOURCES = \
145 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
146 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
147 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-provider-local.cpp \
148 tstClipboardTransfers.cpp
149 endif
150endif
151
152#
153# List of above testcases that will be included in the ValKit.
154#
155ifdef VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
156 if1of ($(KBUILD_TARGET), linux solaris win)
157 VALKIT_UNITTESTS_WHITELIST_GUEST_ADDITIONS += \
158 tstClipboardMockHGCM
159 endif
160endif # VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
161
162include $(FILE_KBUILD_SUB_FOOTER)
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