2007-07-16 08:35:52 +04:00
|
|
|
LEVEL = ../../..
|
|
|
|
include $(LEVEL)/Makefile.common
|
2007-07-11 21:01:13 +04:00
|
|
|
|
2009-07-12 23:00:20 +04:00
|
|
|
# Test in all immediate subdirectories if unset.
|
2009-09-04 21:40:27 +04:00
|
|
|
ifdef TESTSUITE
|
|
|
|
TESTDIRS := $(TESTSUITE:%=$(PROJ_SRC_DIR)/%)
|
|
|
|
else
|
2009-07-25 19:26:08 +04:00
|
|
|
TESTDIRS ?= $(PROJ_SRC_DIR)
|
2009-09-04 21:40:27 +04:00
|
|
|
endif
|
2008-03-10 22:32:31 +03:00
|
|
|
|
2009-09-22 09:16:02 +04:00
|
|
|
# 'lit' wants objdir paths, so it will pick up the lit.site.cfg.
|
|
|
|
TESTDIRS := $(TESTDIRS:$(PROJ_SRC_DIR)%=$(PROJ_OBJ_DIR)%)
|
2009-09-11 03:00:15 +04:00
|
|
|
|
2009-11-05 09:55:24 +03:00
|
|
|
# Allow EXTRA_TESTDIRS to provide additional test directories.
|
|
|
|
TESTDIRS += $(EXTRA_TESTDIRS)
|
|
|
|
|
2009-06-13 22:28:48 +04:00
|
|
|
ifndef TESTARGS
|
2008-04-07 02:32:01 +04:00
|
|
|
ifdef VERBOSE
|
2010-05-12 06:47:23 +04:00
|
|
|
TESTARGS = -v
|
2009-03-13 03:21:49 +03:00
|
|
|
else
|
2010-05-12 06:47:23 +04:00
|
|
|
TESTARGS = -s -v
|
2009-03-18 23:25:18 +03:00
|
|
|
endif
|
2008-04-07 02:32:01 +04:00
|
|
|
endif
|
|
|
|
|
2009-11-05 19:36:19 +03: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-07-11 22:34:43 +04:00
|
|
|
ifdef VG
|
2009-11-05 19:36:19 +03:00
|
|
|
LIT_ARGS += "--vg"
|
2009-07-11 22:34:43 +04:00
|
|
|
endif
|
|
|
|
|
2009-09-11 03:00:15 +04:00
|
|
|
all:: lit.site.cfg
|
2009-09-08 20:39:23 +04:00
|
|
|
@ echo '--- Running clang tests for $(TARGET_TRIPLE) ---'
|
2009-09-29 18:54:28 +04:00
|
|
|
@ $(PYTHON) $(LLVM_SRC_ROOT)/utils/lit/lit.py \
|
2009-11-05 19:36:19 +03:00
|
|
|
$(LIT_ARGS) $(TESTARGS) $(TESTDIRS)
|
2008-03-18 10:03:00 +03:00
|
|
|
|
2009-09-11 03:00:15 +04:00
|
|
|
FORCE:
|
|
|
|
|
|
|
|
lit.site.cfg: FORCE
|
2009-09-20 23:04:35 +04:00
|
|
|
@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" \
|
2009-09-17 23:55:53 +04:00
|
|
|
-e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \
|
2009-09-26 11:36:09 +04:00
|
|
|
-e "s#@LLVM_LIBS_DIR@#$(LibDir)#g" \
|
2009-09-20 23:04:35 +04:00
|
|
|
-e "s#@CLANG_SOURCE_DIR@#$(PROJ_SRC_DIR)/..#g" \
|
|
|
|
-e "s#@CLANG_BINARY_DIR@#$(PROJ_OBJ_DIR)/..#g" \
|
2009-11-03 10:25:53 +03:00
|
|
|
-e "s#@TARGET_TRIPLE@#$(TARGET_TRIPLE)#g" \
|
2009-09-17 23:55:53 +04:00
|
|
|
$(PROJ_SRC_DIR)/lit.site.cfg.in > $@
|
2009-09-11 03:00:15 +04:00
|
|
|
|
2008-03-18 10:03:00 +03:00
|
|
|
clean::
|
2009-11-04 01:39:56 +03:00
|
|
|
@ find . -name Output | xargs rm -fr
|
2008-03-18 10:03:00 +03:00
|
|
|
|
2008-04-07 02:32:01 +04:00
|
|
|
.PHONY: all report clean
|