VirtualBox

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

最後變更 在這個檔案從97272是 97272,由 vboxsync 提交於 2 年 前

Shared Clipboard/testcase: More code for testing reading host clipboard data from the guest side (also wrt overflow handling) with the HGCM mocking framework. Enabled building the testcase on Linux by default.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.9 KB
 
1# $Id: Makefile.kmk 97272 2022-10-24 07:56:53Z vboxsync $
2## @file
3# Sub-Makefile for the Shared Clipboard Host Service testcases.
4#
5
6#
7# Copyright (C) 2011-2022 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.alldomusa.eu.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#
42PROGRAMS.linux += tstClipboardMockHGCM
43tstClipboardMockHGCM_TEMPLATE = VBOXR3TSTEXE
44tstClipboardMockHGCM_DEFS = VBOX_WITH_HGCM VBOX_WITH_SHARED_CLIPBOARD
45tstClipboardMockHGCM_SOURCES = \
46 ../VBoxSharedClipboardSvc.cpp \
47 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
48 $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibClipboard.cpp \
49 $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
50 tstClipboardMockHGCM.cpp
51tstClipboardMockHGCM_LIBS = $(LIB_RUNTIME)
52
53if1of ($(KBUILD_TARGET), linux)
54 tstClipboardMockHGCM_SOURCES.linux += \
55 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
56 ../VBoxSharedClipboardSvc-x11.cpp
57 tstClipboardMockHGCM_LIBPATH = \
58 $(VBOX_LIBPATH_X11)
59 tstClipboardMockHGCM_LIBS += \
60 Xt \
61 X11
62endif
63
64tstClipboardMockHGCM_SOURCES.darwin += ../VBoxSharedClipboardSvc-darwin.cpp
65tstClipboardMockHGCM_SOURCES.win += ../VBoxSharedClipboardSvc-win.cpp
66
67tstClipboardMockHGCM_CLEAN = $(tstClipboardMockHGCM_0_OUTDIR)/tstClipboardMockHGCM.run
68
69if defined(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS)
70 tstClipboardMockHGCM_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
71 tstClipboardMockHGCM_SOURCES += \
72 ../VBoxSharedClipboardSvc-transfers.cpp \
73 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
74endif
75
76if 0 # Enable this if you want automatic runs after compilation.
77 $$(tstClipboardMockHGCM_0_OUTDIR)/tstClipboardMockHGCM.run: $$(tstClipboardMockHGCM_1_STAGE_TARGET)
78 export VBOX_LOG_DEST=nofile; $(tstClipboardMockHGCM_1_STAGE_TARGET) quiet
79 $(QUIET)$(APPEND) -t "$@" "done"
80 OTHERS += $(tstClipboardMockHGCM_0_OUTDIR)/tstClipboardMockHGCM.run
81endif
82
83 #
84 #
85 #
86 PROGRAMS += tstClipboardServiceHost
87 tstClipboardServiceHost_TEMPLATE = VBOXR3TSTEXE
88 tstClipboardServiceHost_DEFS = VBOX_WITH_HGCM UNIT_TEST
89 tstClipboardServiceHost_SOURCES = \
90 ../VBoxSharedClipboardSvc.cpp \
91 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
92 $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
93 tstClipboardServiceHost.cpp
94 tstClipboardServiceHost_LIBS = $(LIB_RUNTIME)
95 tstClipboardServiceHost_CLEAN = $(tstClipboardServiceHost_0_OUTDIR)/tstClipboardServiceHost.run
96
97 if defined(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS)
98 tstClipboardServiceHost_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
99 tstClipboardServiceHost_SOURCES += \
100 ../VBoxSharedClipboardSvc-transfers.cpp \
101 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
102 endif
103
104 #
105 #
106 #
107 PROGRAMS += tstClipboardServiceImpl
108 tstClipboardServiceImpl_TEMPLATE = VBOXR3TSTEXE
109 tstClipboardServiceImpl_DEFS = VBOX_WITH_HGCM UNIT_TEST
110 tstClipboardServiceImpl_SOURCES = \
111 ../VBoxSharedClipboardSvc.cpp \
112 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
113 $(PATH_ROOT)/src/VBox/HostServices/common/message.cpp \
114 tstClipboardServiceImpl.cpp
115 tstClipboardServiceImpl_SOURCES.win = \
116 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp
117 tstClipboardServiceImpl_LIBS = $(LIB_RUNTIME)
118 tstClipboardServiceImpl_CLEAN = $(tstClipboardServiceImpl_0_OUTDIR)/tstClipboardServiceImpl.run
119
120 if defined(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS)
121 #
122 #
123 #
124 PROGRAMS += tstClipboardTransfers
125 tstClipboardTransfers_TEMPLATE = VBOXR3TSTEXE
126 tstClipboardTransfers_DEFS = VBOX_WITH_HGCM UNIT_TEST VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
127 tstClipboardTransfers_SOURCES = \
128 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
129 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
130 tstClipboardTransfers.cpp
131 endif
132endif
133
134include $(FILE_KBUILD_SUB_FOOTER)
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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