X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3903760236c30e3b5ace7a4eefac3a269d68957c..c3c9b80d004dbbfdf763edeb97968c6997e3b45b:/tools/tests/Makefile diff --git a/tools/tests/Makefile b/tools/tests/Makefile index 9080b3347..a385e3dbb 100644 --- a/tools/tests/Makefile +++ b/tools/tests/Makefile @@ -21,18 +21,21 @@ DSTSUBPATH = $(DSTROOT) BATS_CONFIG_PATH = $(DSTROOT) endif +DSTSUBPATH_KEXTS = $(DSTROOT)/System/AppleInternal/Library/AuxiliaryExtensions + COMMON_TARGETS = unit_tests \ MPMMTest \ packetdrill \ affinity \ - execperf \ - kqueue_tests \ superpages \ zero-to-n \ jitter \ perf_index \ - darwintests \ - unixconf + personas \ + unixconf \ + kernpost_test_report \ + +KEXT_TARGETS = pgokext.kext IPHONE_TARGETS = @@ -41,9 +44,9 @@ MAC_TARGETS = BATS_TARGET = $(BATS_CONFIG_PATH)/BATS ifeq "$(Embedded)" "YES" -TARGETS = $(addprefix $(DSTSUBPATH)/, $(COMMON_TARGETS) $(IPHONE_TARGETS)) +TARGETS = $(addprefix $(DSTSUBPATH)/, $(COMMON_TARGETS) $(IPHONE_TARGETS)) $(addprefix $(DSTSUBPATH_KEXTS)/, $(KEXT_TARGETS)) else -TARGETS = $(addprefix $(DSTSUBPATH)/, $(COMMON_TARGETS) $(MAC_TARGETS)) +TARGETS = $(addprefix $(DSTSUBPATH)/, $(COMMON_TARGETS) $(MAC_TARGETS)) $(addprefix $(DSTSUBPATH_KEXTS)/, $(KEXT_TARGETS)) endif all: $(BATS_TARGET) $(TARGETS) @@ -52,15 +55,22 @@ all: $(BATS_TARGET) $(TARGETS) always: +# NOTE: RC_ARCHES nonsense is here because code signing will fail on kexts if we include a i386 slice +# CoreOSLobo: xnu_tests-4026 fails to codesign + +$(DSTSUBPATH_KEXTS)/pgokext.kext: always + xcodebuild -configuration Debug -project $(SRCROOT)/testkext/testkext.xcodeproj -target pgokext DSTROOT=$(DSTSUBPATH_KEXTS) SYMROOT=$(SYMROOT)/testkext SRCROOT=$(SRCROOT)/testkext OBJROOT=$(OBJROOT)/testkext SDKROOT=$(SDKROOT) RC_ARCHS="$(subst i386,,$(RC_ARCHS))" install + $(DSTSUBPATH)/%: always $(_v)echo Building $@ $(_v)mkdir -p $@ $(_v)mkdir -p $(OBJROOT)/$(notdir $@) $(_v)mkdir -p $(SYMROOT)/$(notdir $@) $(_v)$(MAKE) -C $(SRCROOT)/$(notdir $@) SRCROOT=$(SRCROOT)/$(notdir $@) DSTROOT=$@ OBJROOT=$(OBJROOT)/$(notdir $@) SYMROOT=$(SYMROOT)/$(notdir $@) SDKROOT=$(SDKROOT) BASEDSTROOT=$(DSTROOT) + $(_v)find $@ -type d -name "*.dSYM" -exec cp -a {} $(SYMROOT)/ ';' $(BATS_TARGET): $(TARGETS) $(_v)mkdir -p $@ $(_v)mkdir -p $(OBJROOT)/$(notdir $@) $(_v)mkdir -p $(SYMROOT) - $(_v)$(MAKE) -C $(SRCROOT)/$(notdir $@) SRCROOT=$(SRCROOT)/$(notdir $@) DSTROOT=$@ OBJROOT=$(OBJROOT)/$(notdir $@) SDKROOT=$(SDKROOT) BASEDSTROOT=$(DSTROOT) + $(_v)$(MAKE) -C $(SRCROOT)/$(notdir $@) SRCROOT=$(SRCROOT)/$(notdir $@) DSTROOT=$@ OBJROOT=$(OBJROOT)/$(notdir $@) SDKROOT=$(SDKROOT) BASEDSTROOT=$(DSTROOT) BASEDSTSUBPATH=$(DSTSUBPATH)