freebsd-nq/test/Makefile

54 lines
1.3 KiB
Makefile
Raw Normal View History

2009-06-02 17:58:47 +00:00
LEVEL = ../../..
include $(LEVEL)/Makefile.common
# Test in all immediate subdirectories if unset.
2009-10-14 18:03:49 +00:00
ifdef TESTSUITE
TESTDIRS := $(TESTSUITE:%=$(PROJ_SRC_DIR)/%)
else
TESTDIRS ?= $(PROJ_SRC_DIR)
endif
# 'lit' wants objdir paths, so it will pick up the lit.site.cfg.
TESTDIRS := $(TESTDIRS:$(PROJ_SRC_DIR)%=$(PROJ_OBJ_DIR)%)
2009-06-02 17:58:47 +00:00
2009-11-05 17:18:09 +00:00
# Allow EXTRA_TESTDIRS to provide additional test directories.
TESTDIRS += $(EXTRA_TESTDIRS)
2009-06-14 09:24:02 +00:00
ifndef TESTARGS
2009-06-02 17:58:47 +00:00
ifdef VERBOSE
2009-06-14 09:24:02 +00:00
TESTARGS = -v
2009-06-02 17:58:47 +00:00
else
2010-04-06 15:53:59 +00:00
TESTARGS = -s -v
2009-06-02 17:58:47 +00:00
endif
endif
2009-11-05 17:18:09 +00:00
# Make sure any extra test suites can find the main site config.
LIT_ARGS := --param clang_site_config=$(PROJ_OBJ_DIR)/lit.site.cfg
2009-10-14 18:03:49 +00:00
ifdef VG
2009-11-05 17:18:09 +00:00
LIT_ARGS += "--vg"
2009-10-14 18:03:49 +00:00
endif
all:: lit.site.cfg
2009-06-02 17:58:47 +00:00
@ echo '--- Running clang tests for $(TARGET_TRIPLE) ---'
2009-10-14 18:03:49 +00:00
@ $(PYTHON) $(LLVM_SRC_ROOT)/utils/lit/lit.py \
2009-11-05 17:18:09 +00:00
$(LIT_ARGS) $(TESTARGS) $(TESTDIRS)
2009-10-14 18:03:49 +00:00
FORCE:
lit.site.cfg: FORCE
@echo "Making Clang 'lit.site.cfg' file..."
@sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \
-e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \
-e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \
-e "s#@LLVM_LIBS_DIR@#$(LibDir)#g" \
-e "s#@CLANG_SOURCE_DIR@#$(PROJ_SRC_DIR)/..#g" \
-e "s#@CLANG_BINARY_DIR@#$(PROJ_OBJ_DIR)/..#g" \
2009-11-04 15:04:32 +00:00
-e "s#@TARGET_TRIPLE@#$(TARGET_TRIPLE)#g" \
2009-10-14 18:03:49 +00:00
$(PROJ_SRC_DIR)/lit.site.cfg.in > $@
2009-06-02 17:58:47 +00:00
clean::
2009-11-04 15:04:32 +00:00
@ find . -name Output | xargs rm -fr
2009-06-02 17:58:47 +00:00
.PHONY: all report clean