VirtualBox

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

Last change on this file since 89694 was 89590, checked in by vboxsync, 4 years ago

Intel IOMMU: bugref:9967 Added to device struct size and alignment tests.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.0 KB
Line 
1# $Id: Makefile.kmk 89590 2021-06-10 08:43:08Z vboxsync $
2## @file
3# Sub-Makefile for the device testcases.
4#
5
6#
7# Copyright (C) 2006-2020 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_E1000),VBOX_WITH_E1000,) \
33 $(if $(VBOX_WITH_EHCI_IMPL),VBOX_WITH_EHCI_IMPL,) \
34 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
35 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
36 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
37 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,) \
38 $(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
39 $(if $(VBOX_WITH_NVME_IMPL),VBOX_WITH_NVME_IMPL,) \
40 $(if $(VBOX_WITH_PCI_PASSTHROUGH_IMPL),VBOX_WITH_PCI_PASSTHROUGH_IMPL,) \
41 $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
42 $(if $(VBOX_WITH_SCSI),VBOX_WITH_SCSI,) \
43 $(if $(VBOX_WITH_USB),VBOX_WITH_USB,) \
44 $(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
45 $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
46 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
47 $(if $(VBOX_WITH_VMSVGA),VBOX_WITH_VMSVGA,) \
48 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
49 $(if $(VBOX_WITH_XHCI_IMPL),VBOX_WITH_XHCI_IMPL,) \
50 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
51 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
52 $(VBOX_AUDIO_DEFS) \
53 $(VMM_COMMON_DEFS)
54
55#
56# We setup one 'other' target for executing the structure & alignment
57# validation testcases. Perhaps a bit hackish, but extremely useful.
58#
59ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
60 ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH)),)
61 OTHERS += \
62 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
63 endif
64endif
65
66# The normal testing pass.
67TESTING += \
68 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
69
70ifdef VBOX_WITH_RAW_MODE
71 #
72 # The testcase generator.
73 #
74 PROGRAMS += tstDeviceStructSizeRC
75 tstDeviceStructSizeRC_TEMPLATE = VBoxRcExe
76 tstDeviceStructSizeRC_DEFS = $(VBOX_DEVICES_TESTS_FEATURES)
77 tstDeviceStructSizeRC_SOURCES = tstDeviceStructSizeRC.cpp
78 tstDeviceStructSizeRC_INCS = \
79 $(VBOX_PATH_DEVICES_SRC)/build \
80 $(VBOX_PATH_DEVICES_SRC)/Bus \
81 $(VBOX_DEVICES_TEST_OUT_DIR) \
82 $(VBOX_GRAPHICS_INCS)
83 tstDeviceStructSizeRC_INCS += $(VBOX_PATH_VMM_DEVICES_SRC)
84endif # VBOX_WITH_RAW_MODE
85
86#
87# The testcase it self.
88#
89PROGRAMS += tstDeviceStructSize
90if "$(KBUILD_TARGET)" != "win" && $(VBOX_GCC_VERSION_CXX) < 40600
91 #
92 # Disable "ISO C++ prohibits anonymous structs [-Werror=pedantic]" caused by Mesa VMSVGA driver headers
93 # For GCC >= 4.6.0 the warning is disabled in DevVGA_SVGA.h
94 #
95 # Template used for gcc older than 4.6. (Strips away compiler options.)
96 #
97 TEMPLATE_tstDeviceStructSizeOldGCC := tstDeviceStructSizeOldGCC
98 TEMPLATE_tstDeviceStructSizeOldGCC_EXTENDS := VBOXR3AUTOTST
99 TEMPLATE_tstDeviceStructSizeOldGCC_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_tstDeviceStructSizeOldGCC_EXTENDS)_CXXFLAGS))
100
101 tstDeviceStructSize_TEMPLATE = tstDeviceStructSizeOldGCC
102else
103 tstDeviceStructSize_TEMPLATE = VBOXR3AUTOTST
104endif
105tstDeviceStructSize_DEFS = $(VBOX_DEVICES_TESTS_FEATURES)
106tstDeviceStructSize_INCS = \
107 $(VBOX_PATH_DEVICES_SRC)/build \
108 $(VBOX_PATH_DEVICES_SRC)/Bus \
109 $(VBOX_DEVICES_TEST_OUT_DIR) \
110 $(VBOX_GRAPHICS_INCS) \
111 $(VBOX_PATH_VMSVGA_DEVICE_INC)
112tstDeviceStructSize_SOURCES = tstDeviceStructSize.cpp
113tstDeviceStructSize_CLEAN = \
114 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h \
115 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
116ifdef VBOX_WITH_RAW_MODE
117 tstDeviceStructSize.cpp_DEPS = $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h
118endif
119 tstDeviceStructSize_INCS += $(VBOX_PATH_VMM_DEVICES_SRC)
120
121#
122# Run rule for tstDeviceStructSize.
123#
124
125# 1. Dump selected structure in the VMMRC.rc debug info.
126# 2. Generate a testcase from the dump
127## future
128
129ifdef VBOX_WITH_RAW_MODE
130# 1&2. Manually dump selected structures and members.
131$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h: $$(tstDeviceStructSizeRC_1_STAGE_TARGET) | $$(dir $$@)
132 $(call MSG_GENERATE,,$@)
133 $(QUIET)$(REDIRECT) -wo $@ -- $^
134endif
135
136# 3. run it.
137$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run: $$(tstDeviceStructSize_1_STAGE_TARGET) | $$(dir $$@)
138 $(QUIET)$(RM) -f $@
139 $^
140 $(QUIET)$(APPEND) "$@" "done"
141
142# alias for the struct test.
143run-struct-tests: $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
144
145
146include $(FILE_KBUILD_SUB_FOOTER)
147
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