VirtualBox

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

Last change on this file since 33426 was 33360, checked in by vboxsync, 14 years ago

Devices/testcase/Makefile.kmk: Must define VBOX_WITH_EHCI or we'll skip the tests...

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
Line 
1# $Id: Makefile.kmk 33360 2010-10-22 14:54:12Z 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_EHCI
55 tstDeviceStructSizeRC_DEFS += VBOX_WITH_EHCI
56 endif
57 ifdef VBOX_WITH_AHCI
58 tstDeviceStructSizeRC_DEFS += VBOX_WITH_AHCI
59 endif
60 ifdef VBOX_WITH_E1000
61 tstDeviceStructSizeRC_DEFS += VBOX_WITH_E1000
62 endif
63 ifdef VBOX_WITH_VIRTIO
64 tstDeviceStructSizeRC_DEFS += VBOX_WITH_VIRTIO
65 endif
66 ifdef VBOX_WITH_BUSLOGIC
67 tstDeviceStructSizeRC_DEFS += VBOX_WITH_BUSLOGIC
68 endif
69 ifdef VBOX_WITH_SCSI
70 tstDeviceStructSizeRC_DEFS += VBOX_WITH_SCSI
71 endif
72 ifdef VBOX_WITH_LSILOGIC
73 tstDeviceStructSizeRC_DEFS += VBOX_WITH_LSILOGIC
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_EHCI
98 tstDeviceStructSize_DEFS += VBOX_WITH_EHCI
99endif
100ifdef VBOX_WITH_AHCI
101 tstDeviceStructSize_DEFS += VBOX_WITH_AHCI
102endif
103ifdef VBOX_WITH_E1000
104 tstDeviceStructSize_DEFS += VBOX_WITH_E1000
105endif
106ifdef VBOX_WITH_VIRTIO
107 tstDeviceStructSize_DEFS += VBOX_WITH_VIRTIO
108endif
109ifdef VBOX_WITH_BUSLOGIC
110 tstDeviceStructSize_DEFS += VBOX_WITH_BUSLOGIC
111endif
112ifdef VBOX_WITH_LSILOGIC
113 tstDeviceStructSize_DEFS += VBOX_WITH_LSILOGIC
114endif
115ifdef VBOX_WITH_HGSMI
116 tstDeviceStructSize_DEFS += VBOX_WITH_HGSMI
117endif
118ifdef VBOX_WITH_VIDEOHWACCEL
119 tstDeviceStructSize_DEFS += VBOX_WITH_VIDEOHWACCEL
120endif
121ifdef VBOX_WITH_RAW_MODE
122 tstDeviceStructSize_DEFS += VBOX_WITH_RAW_MODE
123endif
124tstDeviceStructSize_INCS = \
125 $(VBOX_PATH_DEVICES_SRC) \
126 $(VBOX_PATH_DEVICES_SRC)/Bus \
127 $(VBOX_DEVICES_TEST_OUT_DIR)
128tstDeviceStructSize_SOURCES = tstDeviceStructSize.cpp
129tstDeviceStructSize_CLEAN = \
130 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h \
131 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
132ifdef VBOX_WITH_RAW_MODE
133 tstDeviceStructSize.cpp_DEPS = $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h
134endif
135
136#
137# Run rule for tstDeviceStructSize.
138#
139
140# 1. Dump selected structure in the VMMGC.gc debug info.
141# 2. Generate a testcase from the dump
142## future
143
144ifdef VBOX_WITH_RAW_MODE
145# 1&2. Manually dump selected structures and members.
146$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h: $$(INSTARGET_tstDeviceStructSizeRC) | $$(dir $$@)
147 $(call MSG_GENERATE,,$@)
148 $(QUIET)$(REDIRECT) -wo $@ -- $^
149endif
150
151# 3. run it.
152$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run: $$(INSTARGET_tstDeviceStructSize) | $$(dir $$@)
153 $(QUIET)$(RM) -f $@
154 $^
155 $(QUIET)$(APPEND) "$@" "done"
156
157# alias for the struct test.
158run-struct-tests: $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
159
160
161include $(KBUILD_PATH)/subfooter.kmk
162
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