1 | # $Id: Makefile.kmk 98576 2023-02-15 01:48:41Z 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 |
|
---|
28 | SUB_DEPTH = ../../../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 | if 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 += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
|
---|
76 | tstClipboardMockHGCM_SOURCES += \
|
---|
77 | ../VBoxSharedClipboardSvc-transfers.cpp \
|
---|
78 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
|
---|
79 | endif
|
---|
80 |
|
---|
81 | if 0 # Enable this if you want automatic runs after compilation.
|
---|
82 | $$(tstClipboardMockHGCM_0_OUTDIR)/tstClipboardMockHGCM.run: $$(tstClipboardMockHGCM_1_STAGE_TARGET)
|
---|
83 | export VBOX_LOG_DEST=nofile; $(tstClipboardMockHGCM_1_STAGE_TARGET) quiet
|
---|
84 | $(QUIET)$(APPEND) -t "$@" "done"
|
---|
85 | OTHERS += $(tstClipboardMockHGCM_0_OUTDIR)/tstClipboardMockHGCM.run
|
---|
86 | endif
|
---|
87 |
|
---|
88 | #
|
---|
89 | #
|
---|
90 | #
|
---|
91 | PROGRAMS += tstClipboardServiceHost
|
---|
92 | tstClipboardServiceHost_TEMPLATE = VBoxR3TstExe
|
---|
93 | tstClipboardServiceHost_DEFS = VBOX_WITH_HGCM UNIT_TEST
|
---|
94 | tstClipboardServiceHost_SOURCES = \
|
---|
95 | ../VBoxSharedClipboardSvc.cpp \
|
---|
96 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
|
---|
97 | $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
|
---|
98 | tstClipboardServiceHost.cpp
|
---|
99 | tstClipboardServiceHost_LIBS = $(LIB_RUNTIME)
|
---|
100 | tstClipboardServiceHost_CLEAN = $(tstClipboardServiceHost_0_OUTDIR)/tstClipboardServiceHost.run
|
---|
101 |
|
---|
102 | if defined(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS)
|
---|
103 | tstClipboardServiceHost_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
|
---|
104 | tstClipboardServiceHost_SOURCES += \
|
---|
105 | ../VBoxSharedClipboardSvc-transfers.cpp \
|
---|
106 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
|
---|
107 | endif
|
---|
108 |
|
---|
109 | #
|
---|
110 | #
|
---|
111 | #
|
---|
112 | PROGRAMS += tstClipboardServiceImpl
|
---|
113 | tstClipboardServiceImpl_TEMPLATE = VBoxR3TstExe
|
---|
114 | tstClipboardServiceImpl_DEFS = VBOX_WITH_HGCM UNIT_TEST
|
---|
115 | tstClipboardServiceImpl_SOURCES = \
|
---|
116 | ../VBoxSharedClipboardSvc.cpp \
|
---|
117 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
|
---|
118 | $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
|
---|
119 | tstClipboardServiceImpl.cpp
|
---|
120 | tstClipboardServiceImpl_SOURCES.win = \
|
---|
121 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp
|
---|
122 | tstClipboardServiceImpl_LIBS = $(LIB_RUNTIME)
|
---|
123 | tstClipboardServiceImpl_CLEAN = $(tstClipboardServiceImpl_0_OUTDIR)/tstClipboardServiceImpl.run
|
---|
124 |
|
---|
125 | if defined(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS)
|
---|
126 | #
|
---|
127 | #
|
---|
128 | #
|
---|
129 | PROGRAMS += tstClipboardTransfers
|
---|
130 | tstClipboardTransfers_TEMPLATE = VBoxR3TstExe
|
---|
131 | tstClipboardTransfers_DEFS = VBOX_WITH_HGCM UNIT_TEST VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
|
---|
132 | tstClipboardTransfers_SOURCES = \
|
---|
133 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
|
---|
134 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
|
---|
135 | tstClipboardTransfers.cpp
|
---|
136 | endif
|
---|
137 | endif
|
---|
138 |
|
---|
139 | #
|
---|
140 | # List of above testcases that will be included in the ValKit.
|
---|
141 | #
|
---|
142 | ifdef VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
|
---|
143 | if1of ($(KBUILD_TARGET), linux solaris win)
|
---|
144 | VALKIT_UNITTESTS_WHITELIST_GUEST_ADDITIONS += \
|
---|
145 | tstClipboardMockHGCM
|
---|
146 | endif
|
---|
147 | endif # VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
|
---|
148 |
|
---|
149 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|