[llvm-commits] [llvm] r112480 - in /llvm/trunk/test: CMakeLists.txt LLVMC/Alias.td LLVMC/AppendCmdHook.td LLVMC/EmptyCompilationGraph.td LLVMC/EnvParentheses.td LLVMC/ForwardAs.td LLVMC/ForwardTransformedValue.td LLVMC/ForwardValue.td LLVMC/HookWithArguments.td LLVMC/HookWithInFile.td LLVMC/Init.td LLVMC/LanguageMap.td LLVMC/MultiValuedOption.td LLVMC/MultipleCompilationGraphs.td LLVMC/NoActions.td LLVMC/NoCompilationGraph.td LLVMC/OneOrMore.td LLVMC/OptionPreprocessor.td LLVMC/OutputSuffixHook.td Makefile lit.cfg
Michael J. Spencer
bigcheesegs at gmail.com
Mon Aug 30 07:49:00 PDT 2010
Author: mspencer
Date: Mon Aug 30 09:49:00 2010
New Revision: 112480
URL: http://llvm.org/viewvc/llvm-project?rev=112480&view=rev
Log:
Test: Fix LLVMC tests on CMake.
The CMake build didn't define TEST_COMPILE_CXX_CMD. The tests assumed gcc.
Modified:
llvm/trunk/test/CMakeLists.txt
llvm/trunk/test/LLVMC/Alias.td
llvm/trunk/test/LLVMC/AppendCmdHook.td
llvm/trunk/test/LLVMC/EmptyCompilationGraph.td
llvm/trunk/test/LLVMC/EnvParentheses.td
llvm/trunk/test/LLVMC/ForwardAs.td
llvm/trunk/test/LLVMC/ForwardTransformedValue.td
llvm/trunk/test/LLVMC/ForwardValue.td
llvm/trunk/test/LLVMC/HookWithArguments.td
llvm/trunk/test/LLVMC/HookWithInFile.td
llvm/trunk/test/LLVMC/Init.td
llvm/trunk/test/LLVMC/LanguageMap.td
llvm/trunk/test/LLVMC/MultiValuedOption.td
llvm/trunk/test/LLVMC/MultipleCompilationGraphs.td
llvm/trunk/test/LLVMC/NoActions.td
llvm/trunk/test/LLVMC/NoCompilationGraph.td
llvm/trunk/test/LLVMC/OneOrMore.td
llvm/trunk/test/LLVMC/OptionPreprocessor.td
llvm/trunk/test/LLVMC/OutputSuffixHook.td
llvm/trunk/test/Makefile
llvm/trunk/test/lit.cfg
Modified: llvm/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CMakeLists.txt?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/CMakeLists.txt (original)
+++ llvm/trunk/test/CMakeLists.txt Mon Aug 30 09:49:00 2010
@@ -24,6 +24,23 @@
include(FindPythonInterp)
if(PYTHONINTERP_FOUND)
+ get_directory_property(DEFINITIONS COMPILE_DEFINITIONS)
+ foreach(DEF ${DEFINITIONS})
+ set(DEFS "${DEFS} -D${DEF}")
+ endforeach()
+ get_directory_property(INC_DIRS INCLUDE_DIRECTORIES)
+ foreach(INC_DIR ${INC_DIRS})
+ set(IDIRS "${IDIRS} -I${INC_DIR}")
+ endforeach()
+ string(REPLACE "<CMAKE_CXX_COMPILER>" "${CMAKE_CXX_COMPILER}" TEST_COMPILE_CXX_CMD ${CMAKE_CXX_COMPILE_OBJECT})
+ string(REPLACE "<DEFINES>" "${DEFS}" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD})
+ string(REPLACE "<FLAGS>" "${CMAKE_CXX_FLAGS}" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD})
+ string(REPLACE "-o" "" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD})
+ string(REGEX REPLACE "<[^>]+>" "" TEST_COMPILE_CXX_CMD ${TEST_COMPILE_CXX_CMD})
+ set(TEST_COMPILE_CXX_CMD "${TEST_COMPILE_CXX_CMD} ${IDIRS}")
+ if(NOT MSVC)
+ set(TEST_COMPILE_CXX_CMD "${TEST_COMPILE_CXX_CMD} -x c++")
+ endif()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/site.exp.in
${CMAKE_CURRENT_BINARY_DIR}/site.exp)
Modified: llvm/trunk/test/LLVMC/Alias.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/Alias.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/Alias.td (original)
+++ llvm/trunk/test/LLVMC/Alias.td Mon Aug 30 09:49:00 2010
@@ -1,7 +1,7 @@
// Test alias generation.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/AppendCmdHook.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/AppendCmdHook.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/AppendCmdHook.td (original)
+++ llvm/trunk/test/LLVMC/AppendCmdHook.td Mon Aug 30 09:49:00 2010
@@ -1,7 +1,7 @@
// Check that hooks can be invoked from 'append_cmd'.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/EmptyCompilationGraph.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/EmptyCompilationGraph.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/EmptyCompilationGraph.td (original)
+++ llvm/trunk/test/LLVMC/EmptyCompilationGraph.td Mon Aug 30 09:49:00 2010
@@ -1,6 +1,6 @@
// Check that the compilation graph can be empty.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/EnvParentheses.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/EnvParentheses.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/EnvParentheses.td (original)
+++ llvm/trunk/test/LLVMC/EnvParentheses.td Mon Aug 30 09:49:00 2010
@@ -2,7 +2,7 @@
// http://llvm.org/bugs/show_bug.cgi?id=4157
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: not grep {FOO")));} %t
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/ForwardAs.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/ForwardAs.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/ForwardAs.td (original)
+++ llvm/trunk/test/LLVMC/ForwardAs.td Mon Aug 30 09:49:00 2010
@@ -2,7 +2,7 @@
// http://llvm.org/bugs/show_bug.cgi?id=4159
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/ForwardTransformedValue.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/ForwardTransformedValue.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/ForwardTransformedValue.td (original)
+++ llvm/trunk/test/LLVMC/ForwardTransformedValue.td Mon Aug 30 09:49:00 2010
@@ -2,7 +2,7 @@
// The dummy tool and graph are required to silence warnings.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/ForwardValue.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/ForwardValue.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/ForwardValue.td (original)
+++ llvm/trunk/test/LLVMC/ForwardValue.td Mon Aug 30 09:49:00 2010
@@ -2,7 +2,7 @@
// The dummy tool and graph are required to silence warnings.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/HookWithArguments.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/HookWithArguments.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/HookWithArguments.td (original)
+++ llvm/trunk/test/LLVMC/HookWithArguments.td Mon Aug 30 09:49:00 2010
@@ -1,7 +1,7 @@
// Check that hooks with arguments work.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/HookWithInFile.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/HookWithInFile.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/HookWithInFile.td (original)
+++ llvm/trunk/test/LLVMC/HookWithInFile.td Mon Aug 30 09:49:00 2010
@@ -1,7 +1,7 @@
// Check that a hook can be given $INFILE as an argument.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/Init.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/Init.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/Init.td (original)
+++ llvm/trunk/test/LLVMC/Init.td Mon Aug 30 09:49:00 2010
@@ -1,7 +1,7 @@
// Check that (init true/false) and (init "str") work.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/LanguageMap.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/LanguageMap.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/LanguageMap.td (original)
+++ llvm/trunk/test/LLVMC/LanguageMap.td Mon Aug 30 09:49:00 2010
@@ -1,7 +1,7 @@
// Check that LanguageMap is processed properly.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/MultiValuedOption.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/MultiValuedOption.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/MultiValuedOption.td (original)
+++ llvm/trunk/test/LLVMC/MultiValuedOption.td Mon Aug 30 09:49:00 2010
@@ -2,7 +2,7 @@
// The dummy tool and graph are required to silence warnings.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/MultipleCompilationGraphs.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/MultipleCompilationGraphs.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/MultipleCompilationGraphs.td (original)
+++ llvm/trunk/test/LLVMC/MultipleCompilationGraphs.td Mon Aug 30 09:49:00 2010
@@ -1,6 +1,6 @@
// Check that multiple compilation graphs are allowed.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/NoActions.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/NoActions.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/NoActions.td (original)
+++ llvm/trunk/test/LLVMC/NoActions.td Mon Aug 30 09:49:00 2010
@@ -1,7 +1,7 @@
// Check that tools without associated actions are accepted.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/NoCompilationGraph.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/NoCompilationGraph.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/NoCompilationGraph.td (original)
+++ llvm/trunk/test/LLVMC/NoCompilationGraph.td Mon Aug 30 09:49:00 2010
@@ -1,6 +1,6 @@
// Check that the compilation graph is not required.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/OneOrMore.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/OneOrMore.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/OneOrMore.td (original)
+++ llvm/trunk/test/LLVMC/OneOrMore.td Mon Aug 30 09:49:00 2010
@@ -2,7 +2,7 @@
// The dummy tool and graph are required to silence warnings.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/OptionPreprocessor.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/OptionPreprocessor.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/OptionPreprocessor.td (original)
+++ llvm/trunk/test/LLVMC/OptionPreprocessor.td Mon Aug 30 09:49:00 2010
@@ -1,7 +1,7 @@
// Test for the OptionPreprocessor and related functionality.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/LLVMC/OutputSuffixHook.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/OutputSuffixHook.td?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/OutputSuffixHook.td (original)
+++ llvm/trunk/test/LLVMC/OutputSuffixHook.td Mon Aug 30 09:49:00 2010
@@ -1,7 +1,7 @@
// Check that hooks can be invoked from 'output_suffix'.
// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
// RUN: FileCheck -input-file %t %s
-// RUN: %compile_cxx -x c++ %t
+// RUN: %compile_cxx %t
// XFAIL: vg_leak
include "llvm/CompilerDriver/Common.td"
Modified: llvm/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/Makefile (original)
+++ llvm/trunk/test/Makefile Mon Aug 30 09:49:00 2010
@@ -145,8 +145,8 @@
@echo 'set objdir "$(LLVM_OBJ_ROOT)/test"' >>site.tmp
@echo 'set gccpath "$(CC)"' >>site.tmp
@echo 'set gxxpath "$(CXX)"' >>site.tmp
- @echo 'set compile_c "' $(CC) $(CPP.Flags) $(TargetCommonOpts) $(CompileCommonOpts) -c '"' >>site.tmp
- @echo 'set compile_cxx "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) $(CompileCommonOpts) -c '"' >> site.tmp
+ @echo 'set compile_c "' $(CC) $(CPP.Flags) $(TargetCommonOpts) $(CompileCommonOpts) -c -x c '"' >>site.tmp
+ @echo 'set compile_cxx "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) $(CompileCommonOpts) -c -x c++ '"' >> site.tmp
@echo 'set link "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) '"' >>site.tmp
@echo 'set llvmgcc "$(LLVMGCC) $(TargetCommonOpts) $(EXTRA_OPTIONS)"' >> site.tmp
@echo 'set llvmgxx "$(LLVMGCC) $(TargetCommonOpts) $(EXTRA_OPTIONS)"' >> site.tmp
Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=112480&r1=112479&r2=112480&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Mon Aug 30 09:49:00 2010
@@ -49,6 +49,14 @@
if 'HOME' in os.environ:
config.environment['HOME'] = os.environ['HOME']
+# Propogate 'INCLUDE' through the environment.
+if 'INCLUDE' in os.environ:
+ config.environment['INCLUDE'] = os.environ['INCLUDE']
+
+# Propogate 'LIB' through the environment.
+if 'LIB' in os.environ:
+ config.environment['LIB'] = os.environ['LIB']
+
# Propogate LLVM_SRC_ROOT into the environment.
config.environment['LLVM_SRC_ROOT'] = getattr(config, 'llvm_src_root', '')
More information about the llvm-commits
mailing list