VirtualBox

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

Last change on this file since 31403 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

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