[clang-tools-extra] r175624 - Tweaks and fixes to cpp11-migrate generated tests
Edwin Vane
edwin.vane at intel.com
Wed Feb 20 06:35:53 PST 2013
Author: revane
Date: Wed Feb 20 08:35:53 2013
New Revision: 175624
URL: http://llvm.org/viewvc/llvm-project?rev=175624&view=rev
Log:
Tweaks and fixes to cpp11-migrate generated tests
* Fixed a comment typo
* Changed 'autogen' to 'generated-tests'
* Made the clean target not fail if the 'generated-tests' directory
doesn't already exist.
Modified:
clang-tools-extra/trunk/test/CMakeLists.txt
clang-tools-extra/trunk/test/Makefile
clang-tools-extra/trunk/test/cpp11-migrate/CMakeLists.txt
clang-tools-extra/trunk/test/cpp11-migrate/Makefile
clang-tools-extra/trunk/test/lit.cfg
Modified: clang-tools-extra/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/CMakeLists.txt?rev=175624&r1=175623&r2=175624&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/test/CMakeLists.txt Wed Feb 20 08:35:53 2013
@@ -35,7 +35,7 @@ set(CLANG_TOOLS_TEST_DEPS
add_lit_testsuite(check-clang-tools "Running the Clang extra tools' regression tests"
${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}/cpp11-migrate/autogen
+ ${CMAKE_CURRENT_BINARY_DIR}/cpp11-migrate/generated_tests
DEPENDS ${CLANG_TOOLS_TEST_DEPS}
ARGS ${CLANG_TOOLS_TEST_EXTRA_ARGS}
)
Modified: clang-tools-extra/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/Makefile?rev=175624&r1=175623&r2=175624&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/Makefile (original)
+++ clang-tools-extra/trunk/test/Makefile Wed Feb 20 08:35:53 2013
@@ -28,7 +28,7 @@ TESTDIRS := $(TESTDIRS:$(PROJ_SRC_DIR)%=
TESTDIRS += $(EXTRA_TESTDIRS)
# List of roots for auto-generated tests.
-TESTDIRS += $(PROJ_OBJ_DIR)/cpp11-migrate/autogen
+TESTDIRS += $(PROJ_OBJ_DIR)/cpp11-migrate/generated_tests
ifndef TESTARGS
ifdef VERBOSE
Modified: clang-tools-extra/trunk/test/cpp11-migrate/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/cpp11-migrate/CMakeLists.txt?rev=175624&r1=175623&r2=175624&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/cpp11-migrate/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/test/cpp11-migrate/CMakeLists.txt Wed Feb 20 08:35:53 2013
@@ -10,20 +10,20 @@ set(generator_scripts
# macro that runs a generator script to produce an auto-generated file.
# Generator scripts must follow scheme above. The resulting file is placed in:
-# ${CMAKE_CURRENT_BINARY_DIR})/autogen/dirname(<script name>).
+# ${CMAKE_CURRENT_BINARY_DIR})/generated_tests/dirname(<script name>).
#
# Two arguments are required:
# script - The generator script (relative to ${CMAKE_CURRENT_SOURCE_DIR})
# output - Name of the variable to store the name of the generated file in.
macro(autogenerate_file script output)
get_filename_component(dir ${script} PATH)
- file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/autogen/${dir}")
+ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/generated_tests/${dir}")
string(REGEX REPLACE "gen_(.*).py" "\\1" output_name ${script})
set(script_file
"${CMAKE_CURRENT_SOURCE_DIR}/${script}"
)
set(output_file
- "${CMAKE_CURRENT_BINARY_DIR}/autogen/${output_name}"
+ "${CMAKE_CURRENT_BINARY_DIR}/generated_tests/${output_name}"
)
set(gencmd
${PYTHON_EXECUTABLE}
@@ -50,10 +50,10 @@ add_custom_target(cpp11-migrate-autogen
DEPENDS ${depends}
)
-set(TEST_SOURCE_ROOT ${CMAKE_CURRENT_BINARY_DIR}/autogen)
+set(TEST_SOURCE_ROOT ${CMAKE_CURRENT_BINARY_DIR}/generated_tests)
set(TEST_EXEC_ROOT ${CMAKE_CURRENT_BINARY_DIR})
set(TESTSUITE_NAME "cpp11-migrate Auto-Generated Tests")
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/../lit.site.cfg.in
- ${CMAKE_CURRENT_BINARY_DIR}/autogen/lit.site.cfg
+ ${CMAKE_CURRENT_BINARY_DIR}/generated_tests/lit.site.cfg
)
Modified: clang-tools-extra/trunk/test/cpp11-migrate/Makefile
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/cpp11-migrate/Makefile?rev=175624&r1=175623&r2=175624&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/cpp11-migrate/Makefile (original)
+++ clang-tools-extra/trunk/test/cpp11-migrate/Makefile Wed Feb 20 08:35:53 2013
@@ -9,7 +9,7 @@
# This Makefile is responsible for creating a LIT testsuite for auto-generated
# tests. The recipe that runs llvm-lit needs to provide the following path of
-# the lit.site.cfg for the generated testsuite: $(PROJ_OBJ_DIR)/autogen.
+# the lit.site.cfg for the generated testsuite: $(PROJ_OBJ_DIR)/generated_tests.
CLANG_LEVEL := ../../../..
include $(CLANG_LEVEL)/Makefile
@@ -26,24 +26,24 @@ GENERATOR_SCRIPTS := \
# 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:
-# $(PROJ_OBJ_DIR)/autogen/$(dir <script name>).
+# $(PROJ_OBJ_DIR)/generated_tests/$(dir <script name>).
#
# One argument required: the name of generator script relative to
# $(PROJ_SRC_DIR).
define autogenerate-file
-OUTFILE := $(addprefix autogen/$(dir $1), $(patsubst gen_%.py,%,$(notdir $1)))
+OUTFILE := $(addprefix generated_tests/$(dir $1), $(patsubst gen_%.py,%,$(notdir $1)))
GENERATED_FILES := $$(GENERATED_FILES) $$(OUTFILE)
$$(OUTFILE): $1
@echo "Autogenerating $$<"
- @$(MKDIR) $(addprefix autogen/, $(dir $1))
+ @$(MKDIR) $(addprefix generated_tests/, $(dir $1))
@$(PYTHON) $$< > $$@
endef
$(foreach script, $(GENERATOR_SCRIPTS), $(eval $(call autogenerate-file,$(script))))
FORCE:
-autogen/lit.site.cfg: FORCE
- @$(MKDIR) $(PROJ_OBJ_DIR)/autogen
+generated_tests/lit.site.cfg: FORCE
+ @$(MKDIR) $(PROJ_OBJ_DIR)/generated_tests
@echo "Making cpp11-migrate Auto-Generated Tests' 'lit.site.cfg' file..."
@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
@@ -52,15 +52,15 @@ autogen/lit.site.cfg: FORCE
@$(ECHOPATH) s=@CLANG_TOOLS_SOURCE_DIR@=$(PROJ_SRC_DIR)/../..=g >> lit.tmp
@$(ECHOPATH) s=@CLANG_TOOLS_BINARY_DIR@=$(PROJ_OBJ_DIR)/../..=g >> lit.tmp
@$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g >> lit.tmp
- @$(ECHOPATH) s=@TEST_SOURCE_ROOT@=$(PROJ_OBJ_DIR)/autogen=g >> lit.tmp
+ @$(ECHOPATH) s=@TEST_SOURCE_ROOT@=$(PROJ_OBJ_DIR)/generated_tests=g >> lit.tmp
@$(ECHOPATH) s=@TEST_EXEC_ROOT@=$(PROJ_OBJ_DIR)=g >> lit.tmp
@$(ECHOPATH) s=@TESTSUITE_NAME@=cpp11-migrate Auto-Generated Tests=g >> lit.tmp
@sed -f lit.tmp $(PROJ_SRC_DIR)/../lit.site.cfg.in > $@
@-rm -f lit.tmp
-all:: $(GENERATED_FILES) autogen/lit.site.cfg
+all:: $(GENERATED_FILES) generated_tests/lit.site.cfg
clean::
- @rm -r autogen
+ @-rm -r generated_tests
.PHONY: all clean
Modified: clang-tools-extra/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/lit.cfg?rev=175624&r1=175623&r2=175624&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/lit.cfg (original)
+++ clang-tools-extra/trunk/test/lit.cfg Wed Feb 20 08:35:53 2013
@@ -8,7 +8,7 @@ import subprocess
# Configuration file for the 'lit' test runner.
-# weak PATH for Win32
+# Tweak PATH for Win32
if platform.system() == 'Windows':
# Seek sane tools in directories and set to $PATH.
path = getattr(config, 'lit_tools_dir', None)
More information about the cfe-commits
mailing list