VirtualBox

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

Last change on this file since 12509 was 12298, checked in by vboxsync, 16 years ago

Devices/testcase/Makefile: Fixed VBOX_DEVICES_TEST_OUT_DIR again.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1# $Id: Makefile.kmk 12298 2008-09-09 14:20:44Z vboxsync $
2## @file
3# Sub-Makefile for the Devices testcases.
4#
5
6#
7# Copyright (C) 2006-2007 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
48#
49# The testcase generator.
50#
51PROGRAMS += tstDeviceStructSizeGC
52tstDeviceStructSizeGC_TEMPLATE = VBOXGCEXE
53tstDeviceStructSizeGC_DEFS =
54ifdef VBOX_WITH_USB
55tstDeviceStructSizeGC_DEFS += VBOX_WITH_USB IN_USB_GC
56endif
57ifdef VBOX_WITH_AHCI
58tstDeviceStructSizeGC_DEFS += VBOX_WITH_AHCI
59endif
60ifdef VBOX_WITH_E1000
61tstDeviceStructSizeGC_DEFS += VBOX_WITH_E1000
62endif
63ifdef VBOX_WITH_BUSLOGIC
64tstDeviceStructSizeGC_DEFS += VBOX_WITH_BUSLOGIC
65endif
66tstDeviceStructSizeGC_SOURCES = tstDeviceStructSizeGC.cpp
67tstDeviceStructSizeGC_INCS = \
68 $(VBOX_PATH_DEVICES_SRC) \
69 $(VBOX_PATH_DEVICES_SRC)/Bus \
70 $(VBOX_DEVICES_TEST_OUT_DIR)
71
72#
73# The testcase it self.
74#
75PROGRAMS += tstDeviceStructSize
76tstDeviceStructSize_TEMPLATE = VBOXR3AUTOTST
77tstDeviceStructSize_DEFS =
78ifdef VBOX_WITH_USB
79tstDeviceStructSize_DEFS += VBOX_WITH_USB IN_USB_GC
80endif
81ifdef VBOX_WITH_AHCI
82tstDeviceStructSize_DEFS += VBOX_WITH_AHCI
83endif
84ifdef VBOX_WITH_E1000
85tstDeviceStructSize_DEFS += VBOX_WITH_E1000
86endif
87ifdef VBOX_WITH_BUSLOGIC
88tstDeviceStructSize_DEFS += VBOX_WITH_BUSLOGIC
89endif
90tstDeviceStructSize_INCS = \
91 $(VBOX_PATH_DEVICES_SRC) \
92 $(VBOX_PATH_DEVICES_SRC)/Bus \
93 $(VBOX_DEVICES_TEST_OUT_DIR)
94tstDeviceStructSize_SOURCES = tstDeviceStructSize.cpp
95tstDeviceStructSize_CLEAN = \
96 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeGC.h \
97 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeGC.run
98tstDeviceStructSize.cpp_DEPS = $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeGC.h
99
100#
101# Run rule for tstDeviceStructSize.
102#
103
104# 1. Dump selected structure in the VMMGC.gc debug info.
105# 2. Generate a testcase from the dump
106## future
107
108# 1&2. Manually dump selected structures and members.
109$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeGC.h: $$(INSTARGET_tstDeviceStructSizeGC) | $$(dir $$@)
110 $(call MSG_GENERATE,,$@)
111 $(QUIET)$(REDIRECT) -wo $@ -- $^
112
113# 3. run it.
114$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run: $$(INSTARGET_tstDeviceStructSize) | $$(dir $$@)
115 $(QUIET)$(RM) -f $@
116 $^
117 $(QUIET)$(APPEND) "$@" "done"
118
119# alias for the struct test.
120run-struct-tests: $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
121
122
123include $(KBUILD_PATH)/subfooter.kmk
124
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