VirtualBox

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

Last change on this file since 47148 was 41477, checked in by vboxsync, 13 years ago

/Makefile.kmk: Cosmetic changes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
Line 
1# $Id: Makefile.kmk 41477 2012-05-29 11:43:27Z vboxsync $
2## @file
3# Sub-Makefile for the device testcases.
4#
5
6#
7# Copyright (C) 2006-2012 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
28VBOX_DEVICES_TESTS_FEATURES = \
29 $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
30 $(if $(VBOX_WITH_USB),VBOX_WITH_USB,) \
31 $(if $(VBOX_WITH_EHCI_IMPL),VBOX_WITH_EHCI_IMPL,) \
32 $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
33 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
34 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
35 $(if $(VBOX_WITH_SCSI),VBOX_WITH_SCSI,) \
36 $(if $(VBOX_WITH_BUSLOGIC),VBOX_WITH_BUSLOGIC,) \
37 $(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
38 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
39 $(if $(VBOX_WITH_CRHGSMI),VBOX_WITH_CRHGSMI,) \
40 $(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
41 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
42 $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
43 $(if $(VBOX_WITH_PCI_PASSTHROUGH_IMPL),VBOX_WITH_PCI_PASSTHROUGH_IMPL,)
44
45
46#
47# We setup one 'other' target for executing the structure & alignment
48# validation testcases. Perhaps a bit hackish, but extremely useful.
49#
50ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
51 ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH)),)
52 OTHERS += \
53 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
54 endif
55endif
56
57# The normal testing pass.
58TESTING += \
59 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
60
61ifdef VBOX_WITH_RAW_MODE
62 #
63 # The testcase generator.
64 #
65 PROGRAMS += tstDeviceStructSizeRC
66 tstDeviceStructSizeRC_TEMPLATE = VBoxRcExe
67 tstDeviceStructSizeRC_DEFS = $(VBOX_DEVICES_TESTS_FEATURES)
68 tstDeviceStructSizeRC_SOURCES = tstDeviceStructSizeRC.cpp
69 tstDeviceStructSizeRC_INCS = \
70 $(VBOX_PATH_DEVICES_SRC)/build \
71 $(VBOX_PATH_DEVICES_SRC)/Bus \
72 $(VBOX_DEVICES_TEST_OUT_DIR)
73endif # VBOX_WITH_RAW_MODE
74
75#
76# The testcase it self.
77#
78PROGRAMS += tstDeviceStructSize
79tstDeviceStructSize_TEMPLATE = VBOXR3AUTOTST
80tstDeviceStructSize_DEFS = $(VBOX_DEVICES_TESTS_FEATURES)
81tstDeviceStructSize_INCS = \
82 $(VBOX_PATH_DEVICES_SRC)/build \
83 $(VBOX_PATH_DEVICES_SRC)/Bus \
84 $(VBOX_DEVICES_TEST_OUT_DIR)
85tstDeviceStructSize_SOURCES = tstDeviceStructSize.cpp
86tstDeviceStructSize_CLEAN = \
87 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h \
88 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
89ifdef VBOX_WITH_RAW_MODE
90 tstDeviceStructSize.cpp_DEPS = $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h
91endif
92
93#
94# Run rule for tstDeviceStructSize.
95#
96
97# 1. Dump selected structure in the VMMGC.gc debug info.
98# 2. Generate a testcase from the dump
99## future
100
101ifdef VBOX_WITH_RAW_MODE
102# 1&2. Manually dump selected structures and members.
103$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h: $$(tstDeviceStructSizeRC_1_STAGE_TARGET) | $$(dir $$@)
104 $(call MSG_GENERATE,,$@)
105 $(QUIET)$(REDIRECT) -wo $@ -- $^
106endif
107
108# 3. run it.
109$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run: $$(tstDeviceStructSize_1_STAGE_TARGET) | $$(dir $$@)
110 $(QUIET)$(RM) -f $@
111 $^
112 $(QUIET)$(APPEND) "$@" "done"
113
114# alias for the struct test.
115run-struct-tests: $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
116
117
118include $(FILE_KBUILD_SUB_FOOTER)
119
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