[llvm-commits] [llvm] r48765 - /llvm/branches/ggreif/parallelized-test/lib/llvm.exp
Gabor Greif
ggreif at gmail.com
Tue Mar 25 01:19:40 PDT 2008
Author: ggreif
Date: Tue Mar 25 03:19:39 2008
New Revision: 48765
URL: http://llvm.org/viewvc/llvm-project?rev=48765&view=rev
Log:
bail out if RunLLVMTests is called with empty list. minor cleanups.
Modified:
llvm/branches/ggreif/parallelized-test/lib/llvm.exp
Modified: llvm/branches/ggreif/parallelized-test/lib/llvm.exp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/parallelized-test/lib/llvm.exp?rev=48765&r1=48764&r2=48765&view=diff
==============================================================================
--- llvm/branches/ggreif/parallelized-test/lib/llvm.exp (original)
+++ llvm/branches/ggreif/parallelized-test/lib/llvm.exp Tue Mar 25 03:19:39 2008
@@ -82,6 +82,12 @@
# This procedure runs the set of tests for the test_source_files array.
proc RunLLVMTests { test_source_files } {
global srcroot objroot srcdir objdir subdir
+
+ if 0==[llength $test_source_files] {
+ verbose "NOTE: test suite without tests: $subdir" 1
+ exit 2
+ }
+
set timeout 60
set path [file join $objdir $subdir]
@@ -109,7 +115,7 @@
puts $makeFileId "SUBDIR = $subdir"
puts $makeFileId ""
puts $makeFileId "%.testresults: [file join $path %]"
- puts $makeFileId "\t@ printf '.'"
+ puts $makeFileId "\t@ printf '.'"
puts $makeFileId "\t@ (echo source \$(LLVM_OBJ_ROOT)/test/site.exp; \\"
puts $makeFileId "\t echo source \$(LLVM_SRC_ROOT)/test/lib/llvm.exp; \\"
puts $makeFileId "\t echo proc fail { msg } { puts '\"FAIL: \$\$msg\"' }; \\"
@@ -128,13 +134,12 @@
puts $makeFileId "TESTS = \\"
foreach test $test_source_files {
- # run_one_test "$test"
output_one_test "$test" $makeFileId
}
puts $makeFileId ""
puts $makeFileId "Test.makefile.out: \$(TESTS)"
- puts $makeFileId "\t@ printf '\\n---- testing $subdir ---\\n'"
+ puts $makeFileId "\t@ printf '\\n---- testing $subdir ---\\n'"
puts $makeFileId "\t@ cat \$(TESTS) > \$@"
puts $makeFileId "\t@ touch \$@"
puts $makeFileId ""
@@ -172,7 +177,7 @@
foreach line [split [read $testFileId] \n] {
# if its the END. line then stop parsing (optimization for big files)
- if {[regexp {END.[[:space:]]*$} $line match endofscript]} {
+ if {[regexp {END.[[:space:]]*$} $line match endofscript]} {
break
# if the line is continued, concatenate and continue the loop
More information about the llvm-commits
mailing list