VirtualBox

Changeset 94585 in vbox for trunk


Ignore:
Timestamp:
Apr 13, 2022 10:35:01 AM (3 years ago)
Author:
vboxsync
Message:

Validation Kit/unit tests: Use a dedicated build template for statically linked unit tests and output those in the validationkit/testcase directory. This leaves the regular (host, non-static) unit tests untouched. Might be optimized later to reduce the overall size of the built Validation Kit .ISO. bugref:10195

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r94574 r94585  
    67016701#
    67026702TEMPLATE_VBOXR3TSTEXE  = VBox Ring 3 Testcase Exe
    6703 if defined(VBOX_ONLY_VALIDATIONKIT) && defined(VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING)
    6704  #
    6705  # Needs for running the ring-3 testcases on older guests (like NT4 / XP).
    6706  # Those testcases then run as part of the Validation Kit and are included on the Validation Kit .ISO.
    6707  # See @bugref:10195.
    6708  #
    6709  TEMPLATE_VBOXR3TSTEXE_EXTENDS = VBoxGuestR3Exe
    6710 else
    6711  TEMPLATE_VBOXR3TSTEXE_EXTENDS = VBOXR3EXE
    6712  TEMPLATE_VBOXR3TSTEXE_LIBS    = $(LIB_RUNTIME) $(TEMPLATE_VBOXR3EXE_LIBS)
    6713 endif
     6703TEMPLATE_VBOXR3TSTEXE_EXTENDS = VBOXR3EXE
     6704TEMPLATE_VBOXR3TSTEXE_LIBS    = $(LIB_RUNTIME) $(TEMPLATE_VBOXR3EXE_LIBS)
    67146705TEMPLATE_VBOXR3TSTEXE_INST    = $(INST_TESTCASE)
    67156706ifdef VBOX_WITH_RUNPATH
     
    67286719        $(PATH_TOOL_$(TEMPLATE_VBOXR3EXE_TOOL.win.x86)_LIB)/oldnames.lib
    67296720endif
     6721
     6722#
     6723# Ring-3 testcase for the Validation Kit .ISO.
     6724#
     6725# Needed for running the ring-3 testcases on older guests (like NT4 / XP).
     6726# Those testcases then run as part of the Validation Kit and are included on the Validation Kit .ISO.
     6727# See @bugref:10195.
     6728#
     6729TEMPLATE_VBOXR3TSTEXE_VALKIT = VBox Ring 3 Testcase Exe for Validation Kit .ISO
     6730TEMPLATE_VBOXR3TSTEXE_VALKIT_EXTENDS = VBoxR3Static
     6731TEMPLATE_VBOXR3TSTEXE_VALKIT_INST    =  $(INST_VALIDATIONKIT)/testcase/
     6732ifn1of ($(KBUILD_TARGET), darwin solaris win)
     6733 TEMPLATE_VBOXR3TSTEXE_VALKIT_CFLAGS          = $(filter-out -static, $(TEMPLATE_VBoxR3Static_CFLAGS))
     6734 TEMPLATE_VBOXR3TSTEXE_VALKIT_CXXFLAGS        = $(filter-out -static, $(TEMPLATE_VBoxR3Static_CXXFLAGS))
     6735 TEMPLATE_VBOXR3TSTEXE_VALKIT_OBJCFLAGS       = $(filter-out -static, $(TEMPLATE_VBoxR3Static_OBJCFLAGS))
     6736 TEMPLATE_VBOXR3TSTEXE_VALKIT_LDFLAGS         = $(filter-out -static, $(TEMPLATE_VBoxR3Static_LDFLAGS))
     6737endif
     6738TEMPLATE_VBOXR3TSTEXE_VALKIT_DEFS = $(filter-out VBOX_WITH_DTRACE,$(TEMPLATE_VBoxR3Static_DEFS))
     6739TEMPLATE_VBOXR3TSTEXE_VALKIT_LIBS = $(TEMPLATE_VBoxR3Static_LIBS)
     6740if1of ($(KBUILD_TARGET), linux)
     6741 if $(VBOX_GCC_VERSION_CXX) < 40800
     6742  TEMPLATE_VBOXR3TSTEXE_VALKIT_LIBS += supc++
     6743  TEMPLATE_VBOXR3TSTEXE_VALKIT_LDTOOL = $(subst GXX,GCC,$(TEMPLATE_VBoxR3Static_TOOL))
     6744 endif
     6745endif
     6746TEMPLATE_VBOXR3TSTEXE_VALKIT_LDFLAGS.darwin = $(TEMPLATE_VBoxR3Static_LDFLAGS.darwin) -framework IOKit
    67306747
    67316748#
  • trunk/src/VBox/Runtime/testcase/Makefile.kmk

    r94576 r94585  
    970970        tstTimer \
    971971        tstRTZip
    972  PROGRAMS := $(filter-out $(VBOX_VALIDATIONKIT_UNITTESTS_SKIP),$(PROGRAMS))
    973 
    974  VBOX_VALIDATIONKIT_UNITTESTS_SKIP.win=\
    975     ntGetTimerResolution
    976  PROGRAMS.win := $(filter-out $(VBOX_VALIDATIONKIT_UNITTESTS_SKIP.win),$(PROGRAMS.win))
    977 endif # VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
     972
     973 VBOX_VALIDATIONKIT_UNITTESTS_SKIP.win +=\
     974        ntGetTimerResolution
     975
     976 VBOX_VALIDATIONKIT_UNITTESTS := $(filter-out $(VBOX_VALIDATIONKIT_UNITTESTS_SKIP),$(PROGRAMS))
     977
     978 ## @todo There might be a more elegant want of copying a target's stuff. Works for now.
     979 define def_unittest_valkit
     980  $(unittest)_ValKit_TEMPLATE       := VBOXR3TSTEXE_VALKIT
     981  $(unittest)_ValKit_SOURCES        += $$($(unittest)_SOURCES)
     982  $(unittest)_ValKit_SOURCES.x86    += $$($(unittest)_SOURCES.x86)
     983  $(unittest)_ValKit_SOURCES.amd64  += $$($(unittest)_SOURCES.amd64)
     984  $(unittest)_ValKit_INCS           += $$($(unittest)_INCS)
     985  $(unittest)_ValKit_INTERMEDIATES  += $$($(unittest)_INTERMEDIATES)
     986  $(unittest)_ValKit_CLEAN          += $$($(unittest)_CLEAN)
     987  $(unittest)_ValKit_NAME           := $(unittest)
     988  PROGRAMS += $(unittest)_ValKit
     989 endef
     990
     991 $(foreach unittest, $(VBOX_VALIDATIONKIT_UNITTESTS), \
     992        $(eval $(call def_unittest_valkit)))
     993
     994endif # defined(VBOX_ONLY_VALIDATIONKIT) && defined(VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING)
    978995
    979996endif # VBOX_WITH_TESTCASES
  • trunk/src/VBox/ValidationKit/Makefile.kmk

    r94462 r94585  
    292292
    293293#
    294 # If enabled, this includes the unit tests located in the $(PATH_OUT)/testcase directory.
     294# If enabled, this includes specially built unit tests (statically linked, for guests) located
     295# in the $(VBOX_PATH_VALIDATIONKIT)/../../testcase/ directory.
     296#
    295297# This is useful if we want to run those on platforms where we don't have / support
    296298# any host support anymore (like Windows XP, for instance).
     
    328330
    329331#
    330 # Included needed dependencies like VBoxRT (VBoxVMM?).
     332# Note: We do not include VBoxRT and stuff here, as this wouldn't work because
     333#       of CRTs on old / ancient guest OSes. See @bugref:10195.
     334#
    331335# Needs careful checking for each and every testcase being run.
    332336# Try to get and include what we have by using wildcards.
     
    334338## @todo Also include R0 and hardening stuff?
    335339#
    336 TMP_UNITTESTS_DEPS_LIB := \
    337         VBoxRT
     340TMP_UNITTESTS_DEPS_LIB :=
    338341
    339342define def_vbox_validationkit_unittests
    340   TMP_UNITTESTS_PATH_BIN = $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/../../../bin
     343  TMP_UNITTESTS_PATH_BIN = $$(VBOX_PATH_VALIDATIONKIT.$(os).$(arch))/../..
    341344  VBOX_VALIDATIONKIT_FILESPEC_UNITTESTS += \
    342345        $(foreach test_whitelist, $(TMP_UNITTESTS_WHITELIST), \
Note: See TracChangeset for help on using the changeset viewer.

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