summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-tools-extra/Makefile28
-rw-r--r--clang-tools-extra/test/Makefile11
-rw-r--r--clang-tools-extra/test/cpp11-migrate/Makefile1
-rw-r--r--clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp4
4 files changed, 16 insertions, 28 deletions
diff --git a/clang-tools-extra/Makefile b/clang-tools-extra/Makefile
index dfbca69e975..602f146ee08 100644
--- a/clang-tools-extra/Makefile
+++ b/clang-tools-extra/Makefile
@@ -12,29 +12,15 @@ CLANG_LEVEL := ../..
include $(CLANG_LEVEL)/../../Makefile.config
PARALLEL_DIRS := remove-cstr-calls tool-template clang-format cpp11-migrate
+DIRS := test
include $(CLANG_LEVEL)/Makefile
-###
-# Handle the nested test suite.
-
-ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
-$(RecursiveTargets)::
- $(Verb) for dir in test; do \
- if [ -f $(PROJ_SRC_DIR)/$${dir}/Makefile ] && [ ! -f $${dir}/Makefile ]; then \
- $(MKDIR) $${dir}; \
- $(CP) $(PROJ_SRC_DIR)/$${dir}/Makefile $${dir}/Makefile; \
- fi \
- done
-endif
-
+# Custom target. Pass request to test/Makefile that knows what to do. To access
+# this target you'd issue:
+#
+# make -C <build_dir>/tools/clang/tools/extra test
test::
- @ $(MAKE) -C test
-
-report::
- @ $(MAKE) -C test report
-
-clean::
- @ $(MAKE) -C test clean
+ @ $(MAKE) -C test test
-.PHONY: test report clean
+.PHONY: test
diff --git a/clang-tools-extra/test/Makefile b/clang-tools-extra/test/Makefile
index 41be4032d68..3c8ba45bf7e 100644
--- a/clang-tools-extra/test/Makefile
+++ b/clang-tools-extra/test/Makefile
@@ -9,8 +9,6 @@
CLANG_LEVEL := ../../..
include $(CLANG_LEVEL)/../../Makefile.config
-
-# Recurse into any subdirectories that have their own Makefiles.
DIRS := cpp11-migrate
include $(CLANG_LEVEL)/Makefile
@@ -45,6 +43,11 @@ ifdef VG
endif
all:: lit.site.cfg
+
+# Run just the Clang extra tools tests. This target assumes 'make (all)' has
+# been run previously as that target is responsible for generating lit config
+# files and auto-generated tests.
+test::
@ echo '--- Running the Clang extra tools tests for $(TARGET_TRIPLE) ---'
@ $(PYTHON) $(LLVM_SRC_ROOT)/utils/lit/lit.py \
$(LIT_ARGS) $(TESTARGS) $(TESTDIRS)
@@ -52,7 +55,7 @@ all:: lit.site.cfg
FORCE:
lit.site.cfg: FORCE
- @echo "Making Clang extra tools' 'lit.site.cfg' file..."
+ @echo "Making lit.site.cfg for Clang extra tools..."
@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
@@ -69,4 +72,4 @@ lit.site.cfg: FORCE
clean::
@ find . -name Output | xargs rm -fr
-.PHONY: all report clean
+.PHONY: all test clean
diff --git a/clang-tools-extra/test/cpp11-migrate/Makefile b/clang-tools-extra/test/cpp11-migrate/Makefile
index 86943930dd0..75f803b73cf 100644
--- a/clang-tools-extra/test/cpp11-migrate/Makefile
+++ b/clang-tools-extra/test/cpp11-migrate/Makefile
@@ -22,7 +22,6 @@ GENERATOR_SCRIPTS := \
UseAuto/gen_basic_std_iterator_tests.cpp.py \
UseAuto/Inputs/gen_my_std.h.py
-
# macro to be used with $(call) that generates a rule and recipe that causes a
# file to be auto-generated from a generator script. Generator scripts must
# follow scheme above. The resulting file is placed in:
diff --git a/clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp b/clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp
index 154914bd3f1..a6d00c7bf96 100644
--- a/clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp
+++ b/clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp
@@ -1,6 +1,6 @@
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
-// NORUN cpp11-migrate -use-auto %t.cpp -- --std=c++11 -I %gen_root/UseAuto/Inputs
-// NORUN FileCheck -input-file=%t.cpp %s
+// RUN: cpp11-migrate -use-auto %t.cpp -- --std=c++11 -I %gen_root/UseAuto/Inputs
+// RUN: FileCheck -input-file=%t.cpp %s
#include "my_std.h"
typedef std::vector<int>::iterator int_iterator;
OpenPOWER on IntegriCloud