VirtualBox

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

Last change on this file since 70775 was 70433, checked in by vboxsync, 7 years ago

Audio: Expose VBOX_WITH_INTEL_HDA (default) in Config.kmk.

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