VirtualBox

source: vbox/trunk/src/VBox/Devices/testcase/Makefile.kmk@ 27866

Last change on this file since 27866 was 26222, checked in by vboxsync, 15 years ago

*.kmk: s/VBOXGC/VBoxRc/g; s/VBOXGCEXE/VBoxRcExe/g; +WERR

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.8 KB
Line 
1# $Id: Makefile.kmk 26222 2010-02-03 21:42:09Z vboxsync $
2## @file
3# Sub-Makefile for the device testcases.
4#
5
6#
7# Copyright (C) 2006-2010 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25#
26# Globals
27#
28VBOX_PATH_DEVICES_SRC ?= $(PATH_ROOT)/src/VBox/Devices
29VBOX_DEVICES_TEST_OUT_DIR := $(PATH_TARGET)/Devices/testcase
30BLDDIRS += $(VBOX_DEVICES_TEST_OUT_DIR)
31
32#
33# We setup one 'other' target for executing the structure & alignment
34# validation testcases. Perhaps a bit hackish, but extremely useful.
35#
36ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
37 ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH)),)
38 OTHERS += \
39 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
40 endif
41endif
42
43# The normal testing pass.
44TESTING += \
45 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
46
47
48ifdef VBOX_WITH_RAW_MODE
49 #
50 # The testcase generator.
51 #
52 PROGRAMS += tstDeviceStructSizeRC
53 tstDeviceStructSizeRC_TEMPLATE = VBoxRcExe
54 tstDeviceStructSizeRC_DEFS = VBOX_WITH_RAW_MODE
55 ifdef VBOX_WITH_USB
56 tstDeviceStructSizeRC_DEFS += VBOX_WITH_USB
57 endif
58 ifdef VBOX_WITH_AHCI
59 tstDeviceStructSizeRC_DEFS += VBOX_WITH_AHCI
60 endif
61 ifdef VBOX_WITH_E1000
62 tstDeviceStructSizeRC_DEFS += VBOX_WITH_E1000
63 endif
64 ifdef VBOX_WITH_VIRTIO
65 tstDeviceStructSizeRC_DEFS += VBOX_WITH_VIRTIO
66 endif
67 ifdef VBOX_WITH_BUSLOGIC
68 tstDeviceStructSizeRC_DEFS += VBOX_WITH_BUSLOGIC
69 endif
70 ifdef VBOX_WITH_SCSI
71 tstDeviceStructSizeRC_DEFS += VBOX_WITH_SCSI
72 endif
73 ifdef VBOX_WITH_LSILOGIC
74 tstDeviceStructSizeRC_DEFS += VBOX_WITH_LSILOGIC
75 endif
76 ifdef VBOX_WITH_HPET
77 tstDeviceStructSizeRC_DEFS += VBOX_WITH_HPET
78 endif
79 ifdef VBOX_WITH_HGSMI
80 tstDeviceStructSizeRC_DEFS += VBOX_WITH_HGSMI
81 endif
82 ifdef VBOX_WITH_VIDEOHWACCEL
83 tstDeviceStructSizeRC_DEFS += VBOX_WITH_VIDEOHWACCEL
84 endif
85 tstDeviceStructSizeRC_SOURCES = tstDeviceStructSizeRC.cpp
86 tstDeviceStructSizeRC_INCS = \
87 $(VBOX_PATH_DEVICES_SRC) \
88 $(VBOX_PATH_DEVICES_SRC)/Bus \
89 $(VBOX_DEVICES_TEST_OUT_DIR)
90endif # VBOX_WITH_RAW_MODE
91
92#
93# The testcase it self.
94#
95PROGRAMS += tstDeviceStructSize
96tstDeviceStructSize_TEMPLATE = VBOXR3AUTOTST
97tstDeviceStructSize_DEFS =
98ifdef VBOX_WITH_USB
99 tstDeviceStructSize_DEFS += VBOX_WITH_USB
100endif
101ifdef VBOX_WITH_AHCI
102 tstDeviceStructSize_DEFS += VBOX_WITH_AHCI
103endif
104ifdef VBOX_WITH_E1000
105 tstDeviceStructSize_DEFS += VBOX_WITH_E1000
106endif
107ifdef VBOX_WITH_VIRTIO
108 tstDeviceStructSize_DEFS += VBOX_WITH_VIRTIO
109endif
110ifdef VBOX_WITH_BUSLOGIC
111 tstDeviceStructSize_DEFS += VBOX_WITH_BUSLOGIC
112endif
113ifdef VBOX_WITH_LSILOGIC
114 tstDeviceStructSize_DEFS += VBOX_WITH_LSILOGIC
115endif
116ifdef VBOX_WITH_HPET
117 tstDeviceStructSize_DEFS += VBOX_WITH_HPET
118endif
119ifdef VBOX_WITH_SMC
120 tstDeviceStructSize_DEFS += VBOX_WITH_SMC
121endif
122ifdef VBOX_WITH_LPC
123 tstDeviceStructSize_DEFS += VBOX_WITH_LPC
124endif
125ifdef VBOX_WITH_HGSMI
126 tstDeviceStructSize_DEFS += VBOX_WITH_HGSMI
127endif
128ifdef VBOX_WITH_VIDEOHWACCEL
129 tstDeviceStructSize_DEFS += VBOX_WITH_VIDEOHWACCEL
130endif
131ifdef VBOX_WITH_RAW_MODE
132 tstDeviceStructSize_DEFS += VBOX_WITH_RAW_MODE
133endif
134tstDeviceStructSize_INCS = \
135 $(VBOX_PATH_DEVICES_SRC) \
136 $(VBOX_PATH_DEVICES_SRC)/Bus \
137 $(VBOX_DEVICES_TEST_OUT_DIR)
138tstDeviceStructSize_SOURCES = tstDeviceStructSize.cpp
139tstDeviceStructSize_CLEAN = \
140 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h \
141 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
142ifdef VBOX_WITH_RAW_MODE
143 tstDeviceStructSize.cpp_DEPS = $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h
144endif
145
146#
147# Run rule for tstDeviceStructSize.
148#
149
150# 1. Dump selected structure in the VMMGC.gc debug info.
151# 2. Generate a testcase from the dump
152## future
153
154ifdef VBOX_WITH_RAW_MODE
155# 1&2. Manually dump selected structures and members.
156$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h: $$(INSTARGET_tstDeviceStructSizeRC) | $$(dir $$@)
157 $(call MSG_GENERATE,,$@)
158 $(QUIET)$(REDIRECT) -wo $@ -- $^
159endif
160
161# 3. run it.
162$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run: $$(INSTARGET_tstDeviceStructSize) | $$(dir $$@)
163 $(QUIET)$(RM) -f $@
164 $^
165 $(QUIET)$(APPEND) "$@" "done"
166
167# alias for the struct test.
168run-struct-tests: $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
169
170
171include $(KBUILD_PATH)/subfooter.kmk
172
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