VirtualBox

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

Last change on this file was 108641, checked in by vboxsync, 6 weeks ago

Removed 2D video acceleration (aka VHWA / VBOX_WITH_VIDEOHWACCEL). bugref:10756

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
Line 
1# $Id: Makefile.kmk 108641 2025-03-20 12:48:42Z vboxsync $
2## @file
3# Sub-Makefile for the device testcases.
4#
5
6#
7# Copyright (C) 2006-2024 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28SUB_DEPTH = ../../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31#
32# Globals
33#
34VBOX_PATH_DEVICES_SRC ?= $(PATH_ROOT)/src/VBox/Devices
35VBOX_PATH_VMM_DEVICES_SRC ?= $(PATH_ROOT)/src/VBox/VMM/include
36VBOX_DEVICES_TEST_OUT_DIR := $(PATH_TARGET)/Devices/testcase
37BLDDIRS += $(VBOX_DEVICES_TEST_OUT_DIR)
38
39VBOX_DEVICES_TESTS_FEATURES = \
40 $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
41 $(if $(VBOX_WITH_BUSLOGIC),VBOX_WITH_BUSLOGIC,) \
42 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
43 $(if $(VBOX_WITH_EHCI_IMPL),VBOX_WITH_EHCI_IMPL,) \
44 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
45 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
46 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
47 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,) \
48 $(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
49 $(if $(VBOX_WITH_NVME_IMPL),VBOX_WITH_NVME_IMPL,) \
50 $(if $(VBOX_WITH_PCI_PASSTHROUGH_IMPL),VBOX_WITH_PCI_PASSTHROUGH_IMPL,) \
51 $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
52 $(if $(VBOX_WITH_SCSI),VBOX_WITH_SCSI,) \
53 $(if $(VBOX_WITH_USB),VBOX_WITH_USB,) \
54 $(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
55 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
56 $(if $(VBOX_WITH_VMSVGA),VBOX_WITH_VMSVGA,) \
57 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
58 $(if $(VBOX_WITH_XHCI_IMPL),VBOX_WITH_XHCI_IMPL,) \
59 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
60 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
61 $(VBOX_AUDIO_DEFS) \
62 $(VMM_COMMON_DEFS)
63
64#
65# We setup one 'other' target for executing the structure & alignment
66# validation testcases. Perhaps a bit hackish, but extremely useful.
67#
68ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
69 ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH)),)
70 OTHERS += \
71 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
72 endif
73endif
74
75# The normal testing pass.
76TESTING += \
77 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
78
79ifdef VBOX_WITH_RAW_MODE
80 #
81 # The testcase generator.
82 #
83 PROGRAMS += tstDeviceStructSizeRC
84 tstDeviceStructSizeRC_TEMPLATE = VBoxRcExe
85 tstDeviceStructSizeRC_DEFS = $(VBOX_DEVICES_TESTS_FEATURES)
86 tstDeviceStructSizeRC_SOURCES = tstDeviceStructSizeRC.cpp
87 tstDeviceStructSizeRC_INCS = \
88 $(VBOX_PATH_DEVICES_SRC)/build \
89 $(VBOX_PATH_DEVICES_SRC)/Bus \
90 $(VBOX_DEVICES_TEST_OUT_DIR) \
91 $(VBOX_GRAPHICS_INCS)
92 tstDeviceStructSizeRC_INCS += $(VBOX_PATH_VMM_DEVICES_SRC)
93endif # VBOX_WITH_RAW_MODE
94
95#
96# The testcase it self.
97#
98PROGRAMS += tstDeviceStructSize
99if "$(KBUILD_TARGET)" != "win" && $(VBOX_GCC_VERSION_CXX) < 40600
100 #
101 # Disable "ISO C++ prohibits anonymous structs [-Werror=pedantic]" caused by Mesa VMSVGA driver headers
102 # For GCC >= 4.6.0 the warning is disabled in DevVGA_SVGA.h
103 #
104 # Template used for gcc older than 4.6. (Strips away compiler options.)
105 #
106 TEMPLATE_tstDeviceStructSizeOldGCC := tstDeviceStructSizeOldGCC
107 TEMPLATE_tstDeviceStructSizeOldGCC_EXTENDS := VBoxR3AutoTest
108 TEMPLATE_tstDeviceStructSizeOldGCC_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_tstDeviceStructSizeOldGCC_EXTENDS)_CXXFLAGS))
109
110 tstDeviceStructSize_TEMPLATE = tstDeviceStructSizeOldGCC
111else
112 tstDeviceStructSize_TEMPLATE = VBoxR3AutoTest
113endif
114tstDeviceStructSize_DEFS = $(VBOX_DEVICES_TESTS_FEATURES)
115tstDeviceStructSize_INCS = \
116 $(VBOX_PATH_DEVICES_SRC)/build \
117 $(VBOX_PATH_DEVICES_SRC)/Bus \
118 $(VBOX_DEVICES_TEST_OUT_DIR) \
119 $(VBOX_GRAPHICS_INCS) \
120 $(VBOX_PATH_VMSVGA_DEVICE_INC)
121tstDeviceStructSize_SOURCES = tstDeviceStructSize.cpp
122tstDeviceStructSize_CLEAN = \
123 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h \
124 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
125ifdef VBOX_WITH_RAW_MODE
126 tstDeviceStructSize.cpp_DEPS = $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h
127endif
128tstDeviceStructSize_INCS += $(VBOX_PATH_VMM_DEVICES_SRC)
129
130#
131# Run rule for tstDeviceStructSize.
132#
133
134# 1. Dump selected structure in the VMMRC.rc debug info.
135# 2. Generate a testcase from the dump
136## future
137
138ifdef VBOX_WITH_RAW_MODE
139 # 1&2. Manually dump selected structures and members.
140 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h: $$(tstDeviceStructSizeRC_1_STAGE_TARGET) | $$(dir $$@)
141 $(call MSG_GENERATE,,$@)
142 $(QUIET)$(REDIRECT) -wo $@ -- $^
143endif
144
145# 3. run it.
146$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run: \
147 $$(tstDeviceStructSize_1_STAGE_TARGET) \
148 | $$(dir $$@) $$(VBOX_RUN_TARGET_ORDER_DEPS)
149 $(QUIET)$(RM) -f $@
150 $^
151 $(QUIET)$(APPEND) "$@" "done"
152
153# alias for the struct test.
154run-struct-tests: $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
155
156
157include $(FILE_KBUILD_SUB_FOOTER)
158
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette