VirtualBox

Changeset 94049 in vbox


Ignore:
Timestamp:
Mar 1, 2022 7:18:38 PM (3 years ago)
Author:
vboxsync
Message:

Validation Kit: Addendum to r150100: Also include required testcase dependencies, use a white list for tests to include and try to get which (white listed) tests are available for all specified platforms. Tests now also can run directly off the Validation Kit .ISO. ​bugref:10195

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/Makefile.kmk

    r94041 r94049  
    5757# The current target is enabled by default.
    5858VBOX_WITH_VALIDATIONKIT_PACKING.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = 1
    59 
     59ifdef VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
     60 VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = 1
     61endif
    6062
    6163#
     
    162164        $(VBOX_PATH_VALIDATIONKIT)/bootsectors/bootsector-shutdown.img
    163165endif
     166
     167VBOX_VALIDATIONKIT_FILESPEC_UNITTESTS =
    164168
    165169# Generate VBOX_PATH_VALIDATIONKIT.os.arch variables.
     
    286290
    287291#
    288 # If enabled, this includes the unit tests located in the out/testcase directory.
     292# If enabled, this includes the unit tests located in the $(PATH_OUT)/testcase directory.
    289293# This is useful if we want to run those on platforms where we don't have / support
    290294# any host support anymore (like Windows XP, for instance).
     
    296300#
    297301ifdef VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
    298  define def_vbox_validationkit_unittests
    299   VBOX_VALIDATIONKIT_PATH_UNITTESTS     := $(PATH_OUT_BASE)/$(os).$(arch)/$(KBUILD_TYPE)/bin
    300   VBOX_VALIDATIONKIT_FILESPEC_UNITTESTS += $$(wildcard $(VBOX_VALIDATIONKIT_PATH_UNITTESTS)/testcase/tst*$(TMP_SUFF_EXE))
    301  endef
    302 
    303  TMP_SUFF_EXE := .exe
    304  $(foreach os, os2 win,$(foreach arch, x86 amd64, \
    305         $(eval $(def_vbox_validationkit_unittests)) \
    306  ))
    307  TMP_SUFF_EXE :=
    308  $(foreach os, darwin freebsd linux solaris,$(foreach arch, x86 amd64, \
    309         $(eval $(def_vbox_validationkit_unittests)) \
    310  ))
    311 endif
    312 
     302
     303# Only include testcases being on the whitelist. Wilcard (*) implicit.
     304TMP_UNITTESTS_WHITELIST := \
     305        tstFile \
     306        tstFileLock \
     307        tstRTLocalIpc \
     308        tstRTPathQueryInfo \
     309        tstRTPipe \
     310        tstRTProcCreateEx \
     311        tstRTProcCreatePrf \
     312        tstRTProcIsRunningByName \
     313        tstRTProcQueryUsername \
     314        tstRTProcWait \
     315        tstTime-2 \
     316        tstTime-3 \
     317        tstTime-4 \
     318        tstTimer \
     319        tstThread-1 \
     320        tstUtf
     321
     322#
     323# Included needed dependencies like VBoxRT (VBoxVMM?).
     324# Needs careful checking for each and every testcase being run.
     325# Try to get and include what we have by using wildcards.
     326#
     327## @todo Also include R0 and hardening stuff?
     328#
     329TMP_UNITTESTS_DEPS_LIB := \
     330        VBoxRT
     331
     332define def_vbox_validationkit_unittests
     333  TMP_UNITTESTS_PATH_BIN                 = $(PATH_OUT_BASE)/$(os).$(arch)/$(KBUILD_TYPE)/bin
     334  VBOX_VALIDATIONKIT_FILESPEC_UNITTESTS += \
     335        $(foreach test_whitelist, $(TMP_UNITTESTS_WHITELIST), \
     336        $$(wildcard $(TMP_UNITTESTS_PATH_BIN)/testcase/$(test_whitelist)$(TMP_SUFF_EXE)))
     337  VBOX_VALIDATIONKIT_FILESPEC_UNITTESTS += \
     338        $(foreach file_dep, $(TMP_UNITTESTS_DEPS_LIB), \
     339        $$(wildcard $(TMP_UNITTESTS_PATH_BIN)/$(file_dep)$(TMP_SUFF_LIB)))
     340endef
     341
     342TMP_SUFF_EXE=.exe
     343TMP_SUFF_LIB=.dll
     344$(foreach os, win,$(foreach arch, x86 amd64, \
     345        $(eval $(def_vbox_validationkit_unittests)) \
     346))
     347TMP_SUFF_EXE=
     348TMP_SUFF_LIB=.so
     349$(foreach os, freebsd linux solaris,$(foreach arch, x86 amd64, \
     350        $(eval $(def_vbox_validationkit_unittests)) \
     351))
     352TMP_SUFF_EXE=
     353TMP_SUFF_LIB=.dylib
     354$(foreach os, darwin,$(foreach arch, amd64, \
     355        $(eval $(def_vbox_validationkit_unittests)) \
     356))
     357endif # VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
    313358
    314359#
     
    341386                                                   $(subst =, $(SP), $(spec)), \
    342387                                                   $(subst /$(INST_VALIDATIONKIT), ,$(spec))))) \
     388                $(foreach spec,$(filter-out %.txt %.dll %.xml %.reg %.img, $(VBOX_VALIDATIONKIT_FILESPEC_UNITTESTS)) \
     389                        ,--chmod=a+x:/$(lastword $(if $(findstring =,$(spec)), \
     390                                                   $(subst =, $(SP), $(spec)), \
     391                                                   $(subst $(PATH_OUT_BASE), testcase,$(spec))))) \
    343392                --volume-id "VBOXVALK_$(VBOX_SVN_REV)_$(VBOX_VERSION_STRING_RAW)" \
    344393                --name-setup joliet \
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