VirtualBox

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

Last change on this file since 57064 was 56292, checked in by vboxsync, 10 years ago

Devices: Updated (C) year.

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