VirtualBox

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

Last change on this file was 106061, checked in by vboxsync, 4 months ago

Copyright year updates by scm.

  • 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 106061 2024-09-16 14:03:52Z vboxsync $
2## @file
3# Sub-Makefile for the Shared Clipboard Host Service testcases.
4#
5
6#
7# Copyright (C) 2011-2024 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 if1of ($(KBUILD_TARGET), linux solaris)
84 tstClipboardMockHGCM_SOURCES += \
85 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-http.cpp
86 endif
87 endif
88 tstClipboardMockHGCM_SOURCES.win += \
89 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp \
90 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardEnumFormatEtcImpl-win.cpp \
91 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardStreamImpl-win.cpp
92 endif
93
94 if 0 # Enable this if you want automatic runs after compilation.
95 $$(tstClipboardMockHGCM_0_OUTDIR)/tstClipboardMockHGCM.run: $$(tstClipboardMockHGCM_1_STAGE_TARGET)
96 export VBOX_LOG_DEST=nofile; $(tstClipboardMockHGCM_1_STAGE_TARGET) quiet
97 $(QUIET)$(APPEND) -t "$@" "done"
98 OTHERS += $(tstClipboardMockHGCM_0_OUTDIR)/tstClipboardMockHGCM.run
99 endif
100
101 #
102 #
103 #
104 PROGRAMS += tstClipboardServiceHost
105 tstClipboardServiceHost_TEMPLATE = VBoxR3TstExe
106 tstClipboardServiceHost_DEFS = VBOX_WITH_HGCM UNIT_TEST
107 tstClipboardServiceHost_SOURCES = \
108 ../VBoxSharedClipboardSvc.cpp \
109 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
110 $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
111 tstClipboardServiceHost.cpp
112 tstClipboardServiceHost_LIBS = $(LIB_RUNTIME)
113 tstClipboardServiceHost_CLEAN = $(tstClipboardServiceHost_0_OUTDIR)/tstClipboardServiceHost.run
114
115 if defined(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS)
116 tstClipboardServiceHost_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
117 tstClipboardServiceHost_SOURCES += \
118 ../VBoxSharedClipboardSvc-transfers.cpp \
119 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
120 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-provider-local.cpp
121 endif
122
123 #
124 #
125 #
126 PROGRAMS += tstClipboardServiceImpl
127 tstClipboardServiceImpl_TEMPLATE = VBoxR3TstExe
128 tstClipboardServiceImpl_DEFS = VBOX_WITH_HGCM UNIT_TEST
129 tstClipboardServiceImpl_SOURCES = \
130 ../VBoxSharedClipboardSvc.cpp \
131 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
132 $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
133 tstClipboardServiceImpl.cpp
134 tstClipboardServiceImpl_SOURCES.win = \
135 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp
136 tstClipboardServiceImpl_LIBS = $(LIB_RUNTIME)
137 tstClipboardServiceImpl_CLEAN = $(tstClipboardServiceImpl_0_OUTDIR)/tstClipboardServiceImpl.run
138
139 if defined(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS)
140 #
141 #
142 #
143 PROGRAMS += tstClipboardTransfers
144 tstClipboardTransfers_TEMPLATE = VBoxR3TstExe
145 tstClipboardTransfers_DEFS = VBOX_WITH_HGCM UNIT_TEST VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
146 tstClipboardTransfers_SOURCES = \
147 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
148 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
149 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-provider-local.cpp \
150 tstClipboardTransfers.cpp
151 endif
152endif
153
154#
155# List of above testcases that will be included in the ValKit.
156#
157ifdef VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
158 if1of ($(KBUILD_TARGET), linux solaris win)
159 VALKIT_UNITTESTS_WHITELIST_GUEST_ADDITIONS += \
160 tstClipboardMockHGCM
161 endif
162endif # VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
163
164include $(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