VirtualBox

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

Last change on this file since 57671 was 57534, checked in by vboxsync, 9 years ago

Missing file

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
Line 
1# $Id: Makefile.kmk 57534 2015-08-25 10:43:10Z 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.virtualbox.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 tstVDSnap
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 PROGRAMS += tstVDIo
36
37 #
38 # VD I/O test scripts to built in -> .cpp
39 #
40 TSTVDIO_BUILTIN_TESTS_FILE = $(tstVDIo_0_OUTDIR)/BuiltinTests.cpp
41 TSTVDIO_BUILTIN_TESTS := \
42 tstVDIo=tstVDIo.vd \
43 tstVDResize=tstVDResize.vd \
44 tstVDCompact=tstVDCompact.vd \
45 tstVDCopy=tstVDCopy.vd \
46 tstVDDiscard=tstVDDiscard.vd \
47 tstVDShareable=tstVDShareable.vd
48 TSTVDIO_BUILTIN_TEST_NAMES := $(foreach test,$(TSTVDIO_BUILTIN_TESTS),$(firstword $(subst =,$(SPACE) ,$(test))))
49 TSTVDIO_PATH_TESTS := $(PATH_SUB_CURRENT)
50
51 # 1=name, 2=filter
52 TSTVDIO_GEN_TEST_MACRO = 'TSTVDIOTESTENTRY const g_a$(1)[] =' '{' \
53 $(foreach testnm,$(filter $(2),$(TSTVDIO_BUILTIN_TEST_NAMES)), ' TSTVDIOTESTENTRY_GEN($(testnm), g_ab$(testnm)),') \
54 '};' 'unsigned const g_c$(1) = RT_ELEMENTS(g_a$(1));' '' ''
55
56 $$(TSTVDIO_BUILTIN_TESTS_FILE): $(MAKEFILE_CURRENT) \
57 $(foreach test,$(TSTVDIO_BUILTIN_TESTS),$(TSTVDIO_PATH_TESTS)/$(lastword $(subst =,$(SPACE) ,$(test)))) \
58 $(VBOX_BIN2C) \
59 | $$(dir $$@)
60 $(QUIET)$(RM) -f -- $@ [email protected]
61 $(QUIET)$(APPEND) -n "$@" \
62 '' \
63 '#include "BuiltinTests.h"' \
64 ''
65 $(foreach test,$(TSTVDIO_BUILTIN_TESTS), $(NLTAB)$(VBOX_BIN2C) -ascii --append \
66 "$(firstword $(subst =,$(SP) ,$(test)))" \
67 "$(TSTVDIO_PATH_TESTS)/$(lastword $(subst =,$(SP) ,$(test)))" \
68 "$@")
69
70# Generate test lists.
71 $(QUIET)$(APPEND) -n "$@" '' \
72 $(call TSTVDIO_GEN_TEST_MACRO,VDIoTests,%) \
73
74 ifn1of ($(KBUILD_TARGET), win)
75 VBOX_TSTVDIO_WITH_LOG_REPLAY = 1
76 endif
77
78 tstVDIo_TEMPLATE = VBOXR3TSTEXE
79 tstVDIo_INCS := $(PATH_SUB_CURRENT)
80
81 ifdef VBOX_TSTVDIO_WITH_LOG_REPLAY
82 tstVDIo_DEFS += VBOX_TSTVDIO_WITH_LOG_REPLAY
83 endif
84
85 tstVDIo_SOURCES = tstVDIo.cpp \
86 VDIoBackend.cpp \
87 VDIoBackendMem.cpp \
88 VDMemDisk.cpp \
89 VDIoRnd.cpp \
90 VDScript.cpp \
91 VDScriptAst.cpp \
92 VDScriptChecker.cpp \
93 VDScriptInterp.cpp \
94 $(TSTVDIO_BUILTIN_TESTS_FILE)
95 tstVDIo_LIBS = \
96 $(LIB_DDU)
97
98 ifdef VBOX_TSTVDIO_WITH_LOG_REPLAY
99 tstVDIo_LIBS += \
100 $(PATH_STAGE_LIB)/StorageDbgLib$(VBOX_SUFF_LIB)
101 endif
102
103 tstVDSnap_TEMPLATE = VBOXR3TSTEXE
104 tstVDSnap_LIBS = $(LIB_DDU)
105 tstVDSnap_SOURCES = tstVDSnap.cpp
106endif
107
108if defined(VBOX_WITH_TESTCASES) || defined(VBOX_WITH_VBOX_IMG)
109 PROGRAMS += vbox-img
110
111 #
112 # vbox-img - static because it migth be used as at standalone tool.
113 #
114 vbox-img_TEMPLATE = VBoxR3Static
115 vbox-img_DEFS += IN_VBOXDDU IN_VBOXDDU_STATIC VBOX_HDD_NO_DYNAMIC_BACKENDS
116 vbox-img_SOURCES = \
117 vbox-img.cpp \
118 ../VD.cpp \
119 ../VDVfs.cpp \
120 ../VDI.cpp \
121 ../VMDK.cpp \
122 ../VHD.cpp \
123 ../DMG.cpp \
124 ../Parallels.cpp \
125 ../ISCSI.cpp \
126 ../RAW.cpp \
127 ../QED.cpp \
128 ../QCOW.cpp \
129 ../VHDX.cpp \
130 ../VCICache.cpp \
131 ../VDIfVfs.cpp
132 vbox-img_SOURCES.win = \
133 vbox-img.rc
134 vbox-img_LIBS = \
135 $(VBOX_LIB_RUNTIME_STATIC)
136 if1of ($(KBUILD_TARGET),os2 win)
137 vbox-img_LIBS += \
138 $(PATH_STAGE_LIB)/VBox-liblzf-static$(VBOX_SUFF_LIB) \
139 $(PATH_STAGE_LIB)/VBox-zlib-static$(VBOX_SUFF_LIB)
140 else
141 vbox-img_LIBS += \
142 $(PATH_STAGE_LIB)/VBox-liblzf$(VBOX_SUFF_LIB) \
143 $(SDK_VBOX_ZLIB_LIBS)
144 endif
145 ifeq ($(KBUILD_TARGET),linux)
146 vbox-img_LIBS += crypt
147 ifdef SDK_VBOX_LIBXML2_LIBS
148 vbox-img_LIBS += xml2
149 endif
150 else if1of ($(KBUILD_TARGET),darwin freebsd)
151 vbox-img_LIBS += iconv
152 else ifeq ($(KBUILD_TARGET),win)
153 vbox-img_SDKS.win = VBOX_NTDLL
154 else ifeq ($(KBUILD_TARGET),solaris)
155 vbox-img_LIBS += kstat
156 endif
157
158endif
159
160include $(FILE_KBUILD_SUB_FOOTER)
161
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