VirtualBox

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

Last change on this file was 98410, checked in by vboxsync, 16 months ago

Devices/*.kmk: Automatic scm cleanups. bugref:10348

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
RevLine 
[2478]1# $Id: Makefile.kmk 98410 2023-02-01 16:20:10Z vboxsync $
2## @file
[25946]3# Sub-Makefile for the device testcases.
[735]4#
5
6#
[98103]7# Copyright (C) 2006-2023 Oracle and/or its affiliates.
[5976]8#
[96407]9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
[5999]11#
[96407]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#
[735]27
[10042]28SUB_DEPTH = ../../../..
[41477]29include $(KBUILD_PATH)/subheader.kmk
[735]30
31#
[12268]32# Globals
33#
34VBOX_PATH_DEVICES_SRC ?= $(PATH_ROOT)/src/VBox/Devices
[60307]35VBOX_PATH_VMM_DEVICES_SRC ?= $(PATH_ROOT)/src/VBox/VMM/include
[12298]36VBOX_DEVICES_TEST_OUT_DIR := $(PATH_TARGET)/Devices/testcase
[12268]37BLDDIRS += $(VBOX_DEVICES_TEST_OUT_DIR)
38
[34092]39VBOX_DEVICES_TESTS_FEATURES = \
40 $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) \
[59804]41 $(if $(VBOX_WITH_BUSLOGIC),VBOX_WITH_BUSLOGIC,) \
[34092]42 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
[59804]43 $(if $(VBOX_WITH_EHCI_IMPL),VBOX_WITH_EHCI_IMPL,) \
44 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
[70433]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,) \
[34092]48 $(if $(VBOX_WITH_LSILOGIC),VBOX_WITH_LSILOGIC,) \
[59804]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,) \
[34092]54 $(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
[35885]55 $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
[59804]56 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
[57537]57 $(if $(VBOX_WITH_VMSVGA),VBOX_WITH_VMSVGA,) \
[59804]58 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
[71721]59 $(if $(VBOX_WITH_XHCI_IMPL),VBOX_WITH_XHCI_IMPL,) \
[88624]60 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
[89590]61 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
62 $(VBOX_AUDIO_DEFS) \
63 $(VMM_COMMON_DEFS)
[34092]64
[12268]65#
[2784]66# We setup one 'other' target for executing the structure & alignment
[735]67# validation testcases. Perhaps a bit hackish, but extremely useful.
68#
[11805]69ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
70 ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH)),)
71 OTHERS += \
[98410]72 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
[735]73 endif
74endif
75
[8991]76# The normal testing pass.
77TESTING += \
[12268]78 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
[8991]79
[25946]80ifdef VBOX_WITH_RAW_MODE
81 #
82 # The testcase generator.
83 #
84 PROGRAMS += tstDeviceStructSizeRC
[26222]85 tstDeviceStructSizeRC_TEMPLATE = VBoxRcExe
[34092]86 tstDeviceStructSizeRC_DEFS = $(VBOX_DEVICES_TESTS_FEATURES)
[25946]87 tstDeviceStructSizeRC_SOURCES = tstDeviceStructSizeRC.cpp
88 tstDeviceStructSizeRC_INCS = \
[35353]89 $(VBOX_PATH_DEVICES_SRC)/build \
[25946]90 $(VBOX_PATH_DEVICES_SRC)/Bus \
[65381]91 $(VBOX_DEVICES_TEST_OUT_DIR) \
92 $(VBOX_GRAPHICS_INCS)
[60307]93 tstDeviceStructSizeRC_INCS += $(VBOX_PATH_VMM_DEVICES_SRC)
[25946]94endif # VBOX_WITH_RAW_MODE
[735]95
96#
97# The testcase it self.
98#
[2784]99PROGRAMS += tstDeviceStructSize
[86043]100if "$(KBUILD_TARGET)" != "win" && $(VBOX_GCC_VERSION_CXX) < 40600
101 #
102 # Disable "ISO C++ prohibits anonymous structs [-Werror=pedantic]" caused by Mesa VMSVGA driver headers
103 # For GCC >= 4.6.0 the warning is disabled in DevVGA_SVGA.h
104 #
105 # Template used for gcc older than 4.6. (Strips away compiler options.)
106 #
107 TEMPLATE_tstDeviceStructSizeOldGCC := tstDeviceStructSizeOldGCC
[98167]108 TEMPLATE_tstDeviceStructSizeOldGCC_EXTENDS := VBoxR3AutoTest
[86043]109 TEMPLATE_tstDeviceStructSizeOldGCC_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_tstDeviceStructSizeOldGCC_EXTENDS)_CXXFLAGS))
110
111 tstDeviceStructSize_TEMPLATE = tstDeviceStructSizeOldGCC
112else
[98167]113 tstDeviceStructSize_TEMPLATE = VBoxR3AutoTest
[86043]114endif
[34092]115tstDeviceStructSize_DEFS = $(VBOX_DEVICES_TESTS_FEATURES)
[2784]116tstDeviceStructSize_INCS = \
[35353]117 $(VBOX_PATH_DEVICES_SRC)/build \
[2784]118 $(VBOX_PATH_DEVICES_SRC)/Bus \
[65381]119 $(VBOX_DEVICES_TEST_OUT_DIR) \
[86024]120 $(VBOX_GRAPHICS_INCS) \
[86905]121 $(VBOX_PATH_VMSVGA_DEVICE_INC)
[735]122tstDeviceStructSize_SOURCES = tstDeviceStructSize.cpp
[2784]123tstDeviceStructSize_CLEAN = \
[25946]124 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h \
[13363]125 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
[25946]126ifdef VBOX_WITH_RAW_MODE
127 tstDeviceStructSize.cpp_DEPS = $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h
128endif
[98410]129tstDeviceStructSize_INCS += $(VBOX_PATH_VMM_DEVICES_SRC)
[735]130
131#
132# Run rule for tstDeviceStructSize.
133#
134
[56284]135# 1. Dump selected structure in the VMMRC.rc debug info.
[735]136# 2. Generate a testcase from the dump
137## future
138
[25946]139ifdef VBOX_WITH_RAW_MODE
[98410]140 # 1&2. Manually dump selected structures and members.
141 $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSizeRC.h: $$(tstDeviceStructSizeRC_1_STAGE_TARGET) | $$(dir $$@)
[2456]142 $(call MSG_GENERATE,,$@)
[11733]143 $(QUIET)$(REDIRECT) -wo $@ -- $^
[25946]144endif
[735]145
146# 3. run it.
[38152]147$(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run: $$(tstDeviceStructSize_1_STAGE_TARGET) | $$(dir $$@)
[735]148 $(QUIET)$(RM) -f $@
[11733]149 $^
[735]150 $(QUIET)$(APPEND) "$@" "done"
151
152# alias for the struct test.
[12268]153run-struct-tests: $(VBOX_DEVICES_TEST_OUT_DIR)/tstDeviceStructSize.run
[735]154
[2784]155
[41477]156include $(FILE_KBUILD_SUB_FOOTER)
[2784]157
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use