X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/39236c6e673c41db228275375ab7fdb0f837b292..7e41aa883dd258f888d0470250eead40a53ef1f5:/tools/tests/Makefile diff --git a/tools/tests/Makefile b/tools/tests/Makefile index e69f54bcd..7a2093aa2 100644 --- a/tools/tests/Makefile +++ b/tools/tests/Makefile @@ -1,40 +1,53 @@ -ifdef RC_ProjectName -DSTSUBPATH = $(DSTROOT)/AppleInternal/CoreOS -else -DSTSUBPATH = $(DSTROOT) -endif +include Makefile.common -OBJROOT?=$(shell /bin/pwd) +ifndef SRCROOT +export SRCROOT := $(shell /bin/pwd) +endif +ifndef OBJROOT +export OBJROOT = $(SRCROOT)/BUILD/obj +endif +ifndef DSTROOT +export DSTROOT = $(SRCROOT)/BUILD/dst +endif +ifndef SYMROOT +export SYMROOT = $(SRCROOT)/BUILD/sym +endif -ifeq "$(RC_TARGET_CONFIG)" "iPhone" -Embedded?=YES +ifdef RC_ProjectName +DSTSUBPATH = $(DSTROOT)/AppleInternal/CoreOS/tests/xnu +BATS_CONFIG_PATH = $(DSTROOT)/AppleInternal/CoreOS else -Embedded?=$(shell echo $(SDKROOT) | grep -iq iphoneos && echo YES || echo NO) +DSTSUBPATH = $(DSTROOT) +BATS_CONFIG_PATH = $(DSTROOT) endif -COMMON_TARGETS = xnu_quick_test \ +COMMON_TARGETS = unit_tests \ MPMMTest \ affinity \ + execperf \ kqueue_tests \ superpages \ zero-to-n \ jitter \ - perf_index \ - unit_tests + perf_index -IPHONE_TARGETS = memorystatus +IPHONE_TARGETS = MAC_TARGETS = + +BATS_TARGET = $(BATS_CONFIG_PATH)/BATS + ifeq "$(Embedded)" "YES" TARGETS = $(addprefix $(DSTSUBPATH)/, $(COMMON_TARGETS) $(IPHONE_TARGETS)) else TARGETS = $(addprefix $(DSTSUBPATH)/, $(COMMON_TARGETS) $(MAC_TARGETS)) endif -all: $(TARGETS) +all: $(BATS_TARGET) $(TARGETS) -$(DSTSUBPATH)/%: +$(BATS_TARGET) $(DSTSUBPATH)/%: mkdir -p $@ mkdir -p $(OBJROOT)/$(notdir $@) - $(MAKE) -C $(SRCROOT)/$(notdir $@) SRCROOT=$(SRCROOT)/$(notdir $@) DSTROOT=$@ OBJROOT=$(OBJROOT)/$(notdir $@) + mkdir -p $(SYMROOT) + $(MAKE) -C $(SRCROOT)/$(notdir $@) SRCROOT=$(SRCROOT)/$(notdir $@) DSTROOT=$@ OBJROOT=$(OBJROOT)/$(notdir $@) SDKROOT=$(SDKROOT)