VirtualBox

source: vbox/trunk/src/VBox/Storage/testcase/Makefile.kmk@ 57531

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

Storage: Remove vditool as it is completely useless by now and was superseeded by vbox-img long ago

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.6 KB
 
1# $Id: Makefile.kmk 57531 2015-08-25 10:32:27Z vboxsync $
2## @file
3# Sub-Makefile for the storage device & driver testcases.
4#
5
6#
7# Copyright (C) 2006-2015 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.alldomusa.eu.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# Basic testcases for the VD code.
23#
24ifdef VBOX_WITH_TESTCASES
25 PROGRAMS += tstVD tstVD-2 tstVDCopy tstVDSnap tstVDShareable
26
27 tstVD_TEMPLATE = VBOXR3TSTEXE
28 tstVD_SOURCES = tstVD.cpp
29 tstVD_LIBS = $(LIB_DDU)
30
31 tstVD-2_TEMPLATE = VBOXR3TSTEXE
32 tstVD-2_SOURCES = tstVD-2.cpp
33 tstVD-2_LIBS = $(LIB_DDU)
34
35 tstVDCopy_TEMPLATE = VBOXR3TSTEXE
36 tstVDCopy_SOURCES = tstVDCopy.cpp
37 tstVDCopy_LIBS = $(LIB_DDU)
38
39 PROGRAMS += tstVDIo
40
41 #
42 # VD I/O test scripts to built in -> .cpp
43 #
44 TSTVDIO_BUILTIN_TESTS_FILE = $(tstVDIo_0_OUTDIR)/BuiltinTests.cpp
45 TSTVDIO_BUILTIN_TESTS := \
46 tstVDIo=tstVDIo.vd \
47 tstVDResize=tstVDResize.vd \
48 tstVDCompact=tstVDCompact.vd \
49 tstVDCopy=tstVDCopy.vd \
50 tstVDDiscard=tstVDDiscard.vd \
51 tstVDShareable=tstVDShareable.vd
52 TSTVDIO_BUILTIN_TEST_NAMES := $(foreach test,$(TSTVDIO_BUILTIN_TESTS),$(firstword $(subst =,$(SPACE) ,$(test))))
53 TSTVDIO_PATH_TESTS := $(PATH_SUB_CURRENT)
54
55 # 1=name, 2=filter
56 TSTVDIO_GEN_TEST_MACRO = 'TSTVDIOTESTENTRY const g_a$(1)[] =' '{' \
57 $(foreach testnm,$(filter $(2),$(TSTVDIO_BUILTIN_TEST_NAMES)), ' TSTVDIOTESTENTRY_GEN($(testnm), g_ab$(testnm)),') \
58 '};' 'unsigned const g_c$(1) = RT_ELEMENTS(g_a$(1));' '' ''
59
60 $$(TSTVDIO_BUILTIN_TESTS_FILE): $(MAKEFILE_CURRENT) \
61 $(foreach test,$(TSTVDIO_BUILTIN_TESTS),$(TSTVDIO_PATH_TESTS)/$(lastword $(subst =,$(SPACE) ,$(test)))) \
62 $(VBOX_BIN2C) \
63 | $$(dir $$@)
64 $(QUIET)$(RM) -f -- $@ [email protected]
65 $(QUIET)$(APPEND) -n "$@" \
66 '' \
67 '#include "BuiltinTests.h"' \
68 ''
69 $(foreach test,$(TSTVDIO_BUILTIN_TESTS), $(NLTAB)$(VBOX_BIN2C) -ascii --append \
70 "$(firstword $(subst =,$(SP) ,$(test)))" \
71 "$(TSTVDIO_PATH_TESTS)/$(lastword $(subst =,$(SP) ,$(test)))" \
72 "$@")
73
74# Generate test lists.
75 $(QUIET)$(APPEND) -n "$@" '' \
76 $(call TSTVDIO_GEN_TEST_MACRO,VDIoTests,%) \
77
78 ifn1of ($(KBUILD_TARGET), win)
79 VBOX_TSTVDIO_WITH_LOG_REPLAY = 1
80 endif
81
82 tstVDIo_TEMPLATE = VBOXR3TSTEXE
83 tstVDIo_INCS := $(PATH_SUB_CURRENT)
84
85 ifdef VBOX_TSTVDIO_WITH_LOG_REPLAY
86 tstVDIo_DEFS += VBOX_TSTVDIO_WITH_LOG_REPLAY
87 endif
88
89 tstVDIo_SOURCES = tstVDIo.cpp \
90 VDIoBackend.cpp \
91 VDIoBackendMem.cpp \
92 VDMemDisk.cpp \
93 VDIoRnd.cpp \
94 VDScript.cpp \
95 VDScriptAst.cpp \
96 VDScriptChecker.cpp \
97 VDScriptInterp.cpp \
98 $(TSTVDIO_BUILTIN_TESTS_FILE)
99 tstVDIo_LIBS = \
100 $(LIB_DDU)
101
102 ifdef VBOX_TSTVDIO_WITH_LOG_REPLAY
103 tstVDIo_LIBS += \
104 $(PATH_STAGE_LIB)/StorageDbgLib$(VBOX_SUFF_LIB)
105 endif
106
107 tstVDSetUuid_TEMPLATE = VBOXR3TSTEXE
108 tstVDSetUuid_LIBS = $(LIB_DDU)
109
110 tstVDShareable_TEMPLATE = VBOXR3TSTEXE
111 tstVDShareable_LIBS = $(LIB_DDU)
112 tstVDShareable_SOURCES = tstVDShareable.cpp
113
114 tstVDSnap_TEMPLATE = VBOXR3TSTEXE
115 tstVDSnap_LIBS = $(LIB_DDU)
116 tstVDSnap_SOURCES = tstVDSnap.cpp
117endif
118
119if defined(VBOX_WITH_TESTCASES) || defined(VBOX_WITH_VBOX_IMG)
120 PROGRAMS += vbox-img
121
122 #
123 # vbox-img - static because it migth be used as at standalone tool.
124 #
125 vbox-img_TEMPLATE = VBoxR3Static
126 vbox-img_DEFS += IN_VBOXDDU IN_VBOXDDU_STATIC VBOX_HDD_NO_DYNAMIC_BACKENDS
127 vbox-img_SOURCES = \
128 vbox-img.cpp \
129 ../VD.cpp \
130 ../VDVfs.cpp \
131 ../VDI.cpp \
132 ../VMDK.cpp \
133 ../VHD.cpp \
134 ../DMG.cpp \
135 ../Parallels.cpp \
136 ../ISCSI.cpp \
137 ../RAW.cpp \
138 ../QED.cpp \
139 ../QCOW.cpp \
140 ../VHDX.cpp \
141 ../VCICache.cpp \
142 ../VDIfVfs.cpp
143 vbox-img_SOURCES.win = \
144 vbox-img.rc
145 vbox-img_LIBS = \
146 $(VBOX_LIB_RUNTIME_STATIC)
147 if1of ($(KBUILD_TARGET),os2 win)
148 vbox-img_LIBS += \
149 $(PATH_STAGE_LIB)/VBox-liblzf-static$(VBOX_SUFF_LIB) \
150 $(PATH_STAGE_LIB)/VBox-zlib-static$(VBOX_SUFF_LIB)
151 else
152 vbox-img_LIBS += \
153 $(PATH_STAGE_LIB)/VBox-liblzf$(VBOX_SUFF_LIB) \
154 $(SDK_VBOX_ZLIB_LIBS)
155 endif
156 ifeq ($(KBUILD_TARGET),linux)
157 vbox-img_LIBS += crypt
158 ifdef SDK_VBOX_LIBXML2_LIBS
159 vbox-img_LIBS += xml2
160 endif
161 else if1of ($(KBUILD_TARGET),darwin freebsd)
162 vbox-img_LIBS += iconv
163 else ifeq ($(KBUILD_TARGET),win)
164 vbox-img_SDKS.win = VBOX_NTDLL
165 else ifeq ($(KBUILD_TARGET),solaris)
166 vbox-img_LIBS += kstat
167 endif
168
169endif
170
171include $(FILE_KBUILD_SUB_FOOTER)
172
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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