1 | # $Id: Makefile.kmk 48214 2013-08-31 16:16:58Z 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 |
|
---|
18 | SUB_DEPTH = ../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | #
|
---|
22 | # Globals
|
---|
23 | #
|
---|
24 | VBOX_PATH_DEVICES_SRC ?= $(PATH_ROOT)/src/VBox/Devices
|
---|
25 | VBOX_DEVICES_TEST_OUT_DIR := $(PATH_TARGET)/Devices/testcase
|
---|
26 | BLDDIRS += $(VBOX_DEVICES_TEST_OUT_DIR)
|
---|
27 |
|
---|
28 | VBOX_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_NEW_PS2M),VBOX_WITH_NEW_PS2M,) \
|
---|
39 | $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
|
---|
40 | $(if $(VBOX_WITH_CRHGSMI),VBOX_WITH_CRHGSMI,) \
|
---|
41 | $(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
|
---|
42 | $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
|
---|
43 | $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
|
---|
44 | $(if $(VBOX_WITH_PCI_PASSTHROUGH_IMPL),VBOX_WITH_PCI_PASSTHROUGH_IMPL,)
|
---|
45 |
|
---|
46 |
|
---|
47 | #
|
---|
48 | # We setup one 'other' target for executing the structure & alignment
|
---|
49 | # validation testcases. Perhaps a bit hackish, but extremely useful.
|
---|
50 | #
|
---|
51 | ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
|
---|
52 | ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH)),)
|
---|
53 | OTHERS += \
|
---|
54 | $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
|
---|
55 | endif
|
---|
56 | endif
|
---|
57 |
|
---|
58 | # The normal testing pass.
|
---|
59 | TESTING += \
|
---|
60 | $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
|
---|
61 |
|
---|
62 | ifdef VBOX_WITH_RAW_MODE
|
---|
63 | #
|
---|
64 | # The testcase generator.
|
---|
65 | #
|
---|
66 | PROGRAMS += tstDeviceStructSizeRC
|
---|
67 | tstDeviceStructSizeRC_TEMPLATE = VBoxRcExe
|
---|
68 | tstDeviceStructSizeRC_DEFS = $(VBOX_DEVICES_TESTS_FEATURES)
|
---|
69 | tstDeviceStructSizeRC_SOURCES = tstDeviceStructSizeRC.cpp
|
---|
70 | tstDeviceStructSizeRC_INCS = \
|
---|
71 | $(VBOX_PATH_DEVICES_SRC)/build \
|
---|
72 | $(VBOX_PATH_DEVICES_SRC)/Bus \
|
---|
73 | $(VBOX_DEVICES_TEST_OUT_DIR)
|
---|
74 | endif # VBOX_WITH_RAW_MODE
|
---|
75 |
|
---|
76 | #
|
---|
77 | # The testcase it self.
|
---|
78 | #
|
---|
79 | PROGRAMS += tstDeviceStructSize
|
---|
80 | tstDeviceStructSize_TEMPLATE = VBOXR3AUTOTST
|
---|
81 | tstDeviceStructSize_DEFS = $(VBOX_DEVICES_TESTS_FEATURES)
|
---|
82 | tstDeviceStructSize_INCS = \
|
---|
83 | $(VBOX_PATH_DEVICES_SRC)/build \
|
---|
84 | $(VBOX_PATH_DEVICES_SRC)/Bus \
|
---|
85 | $(VBOX_DEVICES_TEST_OUT_DIR)
|
---|
86 | tstDeviceStructSize_SOURCES = tstDeviceStructSize.cpp
|
---|
87 | tstDeviceStructSize_CLEAN = \
|
---|
88 | $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h \
|
---|
89 | $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
|
---|
90 | ifdef VBOX_WITH_RAW_MODE
|
---|
91 | tstDeviceStructSize.cpp_DEPS = $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h
|
---|
92 | endif
|
---|
93 |
|
---|
94 | #
|
---|
95 | # Run rule for tstDeviceStructSize.
|
---|
96 | #
|
---|
97 |
|
---|
98 | # 1. Dump selected structure in the VMMGC.gc debug info.
|
---|
99 | # 2. Generate a testcase from the dump
|
---|
100 | ## future
|
---|
101 |
|
---|
102 | ifdef VBOX_WITH_RAW_MODE
|
---|
103 | # 1&2. Manually dump selected structures and members.
|
---|
104 | $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h: $$(tstDeviceStructSizeRC_1_STAGE_TARGET) | $$(dir $$@)
|
---|
105 | $(call MSG_GENERATE,,$@)
|
---|
106 | $(QUIET)$(REDIRECT) -wo $@ -- $^
|
---|
107 | endif
|
---|
108 |
|
---|
109 | # 3. run it.
|
---|
110 | $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run: $$(tstDeviceStructSize_1_STAGE_TARGET) | $$(dir $$@)
|
---|
111 | $(QUIET)$(RM) -f $@
|
---|
112 | $^
|
---|
113 | $(QUIET)$(APPEND) "$@" "done"
|
---|
114 |
|
---|
115 | # alias for the struct test.
|
---|
116 | run-struct-tests: $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
|
---|
117 |
|
---|
118 |
|
---|
119 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
120 |
|
---|