VirtualBox

Changeset 69528 in vbox for trunk


Ignore:
Timestamp:
Oct 30, 2017 5:35:16 PM (7 years ago)
Author:
vboxsync
Message:

Linux drivers: move module test build function to Config.kmk.
bugref:4567: Linux kernel driver maintenance

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r69508 r69528  
    42044204
    42054205ifeq ($(KBUILD_TARGET),linux)
    4206 TEMPLATE_VBOXR0DRV_TOOL                = $(NO_SUCH_VARIABLE)
     4206 TEMPLATE_VBOXR0DRV_TOOL                = $(NO_SUCH_VARIABLE)
     4207
     4208##
     4209# Using the extra expansion to replace $(module) before eval, thus everything
     4210# else needs escaped dollars.
     4211 define VBOX_LINUX_GENERATE_KMOD_TEST
     4212  VBOX_TARGET_$(module) = $$(PATH_TARGET)/tst$(module)_mod.run
     4213  TESTING      += $$(VBOX_TARGET_$(module))
     4214  OTHERS       += $$(VBOX_TARGET_$(module))
     4215  OTHERS_CLEAN += $$(VBOX_TARGET_$(module))
     4216  $$$$(VBOX_TARGET_$(module)): $$$$($(module)_2_STAGE_TARGETS)
     4217        $(QUIET)$$(call MSG_L1,Doing a test build of the $(module) kernel module)
     4218        $(QUIET)$$(RM) -f -- "$$@"
     4219        $(QUIET)$$(RM) -Rf -- "$$(PATH_TARGET)/tst$(module)_mod"
     4220        $(QUIET)$$(MKDIR) -p -- "$$(PATH_TARGET)/tst$(module)_mod"
     4221        $(QUIET)$$(CP) -R -- "$$(PATH_STAGE_BIN)/../$$($(module)_INST)" "$$(PATH_TARGET)/tst$(module)_mod/"
     4222        + $(QUIET)make KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C $$(PATH_TARGET)/tst$(module)_mod clean
     4223        + $(QUIET)make KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C $$(PATH_TARGET)/tst$(module)_mod
     4224        $(QUIET)$$(RM) -Rf -- $$(PATH_TARGET)/tst$(module)_mod
     4225        $(QUIET)$$(APPEND) -t "$$@" "done"
     4226 endef
     4227
    42074228endif
    42084229
  • trunk/src/VBox/Additions/linux/Makefile.kmk

    r69111 r69528  
    361361 && !defined(VBOX_ONLY_VALIDATIONKIT) \
    362362 && !defined(VBOX_WITHOUT_LINUX_TEST_BUILDS) \
     363 && "$(KBUILD_TARGET)" == "linux" \
    363364 && "$(KBUILD_HOST_ARCH)" == "$(KBUILD_TARGET_ARCH)"
    364365
    365  KBUILD_VERBOSE ?=
    366 
    367 ##
    368 # Using the extra expansion to replace $(ver) before eval, thus everything
    369 # else needs escaped dollars.
    370  define def_vboxadd_mod_test
    371   TESTING      += $$(PATH_TARGET)/tst$(module)_mod.run
    372   OTHERS       += $$(PATH_TARGET)/tst$(module)_mod.run
    373   OTHERS_CLEAN += $$(PATH_TARGET)/tst$(module)_mod.run
    374   $$$$(PATH_TARGET)/tst$(module)_mod.run: $$$$($(module)-mod_2_STAGE_TARGETS)
    375         $(QUIET)$$(call MSG_L1,Doing a test build of the $(module) kernel module)
    376         $(QUIET)$$(RM) -f -- "$@"
    377         $(QUIET)$$(RM) -Rf -- "$$(PATH_TARGET)/tst$(module)_mod"
    378         $(QUIET)$$(MKDIR) -p -- "$$(PATH_TARGET)/tst$(module)_mod"
    379         $(QUIET)$$(CP) -R -- "$$(PATH_STAGE_BIN)/additions/src/$(module)/" "$$(PATH_TARGET)/tst$(module)_mod/"
    380         + $(QUIET)make KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C $$(PATH_TARGET)/tst$(module)_mod clean
    381         + $(QUIET)make KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C $$(PATH_TARGET)/tst$(module)_mod
    382         $(QUIET)$$(RM) -Rf -- $$(PATH_TARGET)/tst$(module)_mod
    383         $(QUIET)$$(APPEND) -t "$$@" "done"
    384  endef
    385  $(foreach module, vboxguest vboxsf vboxvideo, $(eval $(def_vboxadd_mod_test)))
     366 $(foreach module, vboxguest-mod vboxsf-mod vboxvideo-mod, $(eval $(VBOX_LINUX_GENERATE_KMOD_TEST)))
    386367
    387368endif
  • trunk/src/VBox/HostDrivers/Makefile.kmk

    r69250 r69528  
    7676 && "$(KBUILD_TARGET)" == "linux" \
    7777 && "$(KBUILD_HOST_ARCH)" == "$(KBUILD_TARGET_ARCH)"
    78  VBOX_LNX_MOD_TEST        = $(PATH_TARGET)/tsthost_mod
    79  VBOX_LNX_MOD_TEST_TARGET = $(PATH_TARGET)/tsthost_mod.run
    80  TESTING     += $(VBOX_LNX_MOD_TEST_TARGET)
    81  OTHERS      += $(VBOX_LNX_MOD_TEST_TARGET)
    82  OTHER_CLEAN += $(VBOX_LNX_MOD_TEST_TARGET)
    83  $$(VBOX_LNX_MOD_TEST_TARGET): \
    84                 $$(vboxdrv-mod_2_STAGE_TARGETS) \
    85                 $$(VBoxNetFlt-src_2_STAGE_TARGETS) \
    86                 $$(VBoxNetAdp-src_2_STAGE_TARGETS) \
    87                 $$(VBoxPci-src_2_STAGE_TARGETS) \
    88                 $$(HostDrivers-scripts_2_STAGE_TARGETS)
    89         $(QUIET)$(call MSG_L1,Doing a test build of the host kernel modules)
    90         $(QUIET)$(RM) -f -- "$@"
    91         $(QUIET)$(RM) -Rf -- "$(VBOX_LNX_MOD_TEST)"
    92         $(QUIET)$(MKDIR) -p -- "$(VBOX_LNX_MOD_TEST)"
    93         $(QUIET)$(CP) -R -- "$(PATH_STAGE_BIN)/src/" "$(VBOX_LNX_MOD_TEST)/"
    94         + $(QUIET)make -C $(VBOX_LNX_MOD_TEST) clean
    95         + $(QUIET)make -C $(VBOX_LNX_MOD_TEST)
    96         $(QUIET)$(RM) -Rf -- $(VBOX_LNX_MOD_TEST)
    97         $(QUIET)$(APPEND) -t "$@" "done"
     78
     79 $(foreach module, vboxdrv-mod VBoxNetFlt-src VBoxNetAdp-src VBoxPci-src, $(eval $(VBOX_LINUX_GENERATE_KMOD_TEST)))
    9880
    9981endif
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