VirtualBox

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

Last change on this file since 33210 was 32471, checked in by vboxsync, 14 years ago

Devices: refactoring, further PCI work

  • 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 32471 2010-09-14 10:26:07Z 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_HGSMI
73 tstDeviceStructSizeRC_DEFS += VBOX_WITH_HGSMI
74 endif
75 ifdef VBOX_WITH_VIDEOHWACCEL
76 tstDeviceStructSizeRC_DEFS += VBOX_WITH_VIDEOHWACCEL
77 endif
78 tstDeviceStructSizeRC_SOURCES = tstDeviceStructSizeRC.cpp
79 tstDeviceStructSizeRC_INCS = \
80 $(VBOX_PATH_DEVICES_SRC) \
81 $(VBOX_PATH_DEVICES_SRC)/Bus \
82 $(VBOX_DEVICES_TEST_OUT_DIR)
83endif # VBOX_WITH_RAW_MODE
84
85#
86# The testcase it self.
87#
88PROGRAMS += tstDeviceStructSize
89tstDeviceStructSize_TEMPLATE = VBOXR3AUTOTST
90tstDeviceStructSize_DEFS =
91ifdef VBOX_WITH_USB
92 tstDeviceStructSize_DEFS += VBOX_WITH_USB
93endif
94ifdef VBOX_WITH_AHCI
95 tstDeviceStructSize_DEFS += VBOX_WITH_AHCI
96endif
97ifdef VBOX_WITH_E1000
98 tstDeviceStructSize_DEFS += VBOX_WITH_E1000
99endif
100ifdef VBOX_WITH_VIRTIO
101 tstDeviceStructSize_DEFS += VBOX_WITH_VIRTIO
102endif
103ifdef VBOX_WITH_BUSLOGIC
104 tstDeviceStructSize_DEFS += VBOX_WITH_BUSLOGIC
105endif
106ifdef VBOX_WITH_LSILOGIC
107 tstDeviceStructSize_DEFS += VBOX_WITH_LSILOGIC
108endif
109ifdef VBOX_WITH_HGSMI
110 tstDeviceStructSize_DEFS += VBOX_WITH_HGSMI
111endif
112ifdef VBOX_WITH_VIDEOHWACCEL
113 tstDeviceStructSize_DEFS += VBOX_WITH_VIDEOHWACCEL
114endif
115ifdef VBOX_WITH_RAW_MODE
116 tstDeviceStructSize_DEFS += VBOX_WITH_RAW_MODE
117endif
118tstDeviceStructSize_INCS = \
119 $(VBOX_PATH_DEVICES_SRC) \
120 $(VBOX_PATH_DEVICES_SRC)/Bus \
121 $(VBOX_DEVICES_TEST_OUT_DIR)
122tstDeviceStructSize_SOURCES = tstDeviceStructSize.cpp
123tstDeviceStructSize_CLEAN = \
124 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h \
125 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
126ifdef VBOX_WITH_RAW_MODE
127 tstDeviceStructSize.cpp_DEPS = $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h
128endif
129
130#
131# Run rule for tstDeviceStructSize.
132#
133
134# 1. Dump selected structure in the VMMGC.gc debug info.
135# 2. Generate a testcase from the dump
136## future
137
138ifdef VBOX_WITH_RAW_MODE
139# 1&2. Manually dump selected structures and members.
140$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h: $$(INSTARGET_tstDeviceStructSizeRC) | $$(dir $$@)
141 $(call MSG_GENERATE,,$@)
142 $(QUIET)$(REDIRECT) -wo $@ -- $^
143endif
144
145# 3. run it.
146$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run: $$(INSTARGET_tstDeviceStructSize) | $$(dir $$@)
147 $(QUIET)$(RM) -f $@
148 $^
149 $(QUIET)$(APPEND) "$@" "done"
150
151# alias for the struct test.
152run-struct-tests: $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
153
154
155include $(KBUILD_PATH)/subfooter.kmk
156
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