* testsuite/lib/passfail.exp (newlib_pass_fail_all): New
procedure. (newlib_pass_fail): Change to compile and run only one file. * testsuite/newlib.locale/locale.exp: Use new newlib_pass_fail_all procedure. * testsuite/newlib.string/string.exp: Likewise.
This commit is contained in:
parent
fb92103141
commit
c9ca68d7b5
|
@ -1,3 +1,12 @@
|
||||||
|
2002-06-18 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||||
|
|
||||||
|
* testsuite/lib/passfail.exp (newlib_pass_fail_all): New
|
||||||
|
procedure.
|
||||||
|
(newlib_pass_fail): Change to compile and run only one file.
|
||||||
|
* testsuite/newlib.locale/locale.exp: Use new
|
||||||
|
newlib_pass_fail_all procedure.
|
||||||
|
* testsuite/newlib.string/string.exp: Likewise.
|
||||||
|
|
||||||
2002-06-18 Dave Brolley <brolley@redhat.com>
|
2002-06-18 Dave Brolley <brolley@redhat.com>
|
||||||
|
|
||||||
From Catherine Moore, Michael Meissner, Richard Sandiford:
|
From Catherine Moore, Michael Meissner, Richard Sandiford:
|
||||||
|
|
|
@ -4,36 +4,49 @@
|
||||||
# is freely granted, provided that this notice is preserved.
|
# is freely granted, provided that this notice is preserved.
|
||||||
#
|
#
|
||||||
|
|
||||||
# newlib_pass_fail compiles and runs all the source files in the test
|
# newlib_pass_fail_all compiles and runs all the source files in the
|
||||||
# directory that are not included in the check_output_tests list.
|
# test directory. If flag is -x, then the sources whose basenames are
|
||||||
# check_output_tests lists the sources' basenames.
|
# listed in exclude_list are not compiled and run.
|
||||||
|
|
||||||
proc newlib_pass_fail { check_output_tests } {
|
proc newlib_pass_fail_all { flag exclude_list } {
|
||||||
global srcdir objdir subdir runtests
|
global srcdir objdir subdir runtests
|
||||||
|
|
||||||
foreach testcase [glob -nocomplain $srcdir/$subdir/*.c] {
|
foreach fullsrcfile [glob -nocomplain $srcdir/$subdir/*.c] {
|
||||||
|
set srcfile "[file tail $fullsrcfile]"
|
||||||
# If we're only testing specific files and this isn't one of them, skip it.
|
# If we're only testing specific files and this isn't one of them, skip it.
|
||||||
if ![runtest_file_p $runtests $testcase] then {
|
if ![runtest_file_p $runtests $srcfile] then {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
# Exclude tests which require their output to be checked
|
# Exclude tests listed in exclude_list.
|
||||||
if {[lsearch $check_output_tests "[file tail $testcase]"] != -1} then {
|
if { $flag == "-x" } then {
|
||||||
continue
|
if {[lsearch $exclude_list "$srcfile"] != -1} then {
|
||||||
}
|
continue
|
||||||
|
}
|
||||||
set test_driver "$objdir/testsuite/[file tail [file rootname $testcase].x]"
|
|
||||||
|
|
||||||
set comp_output [newlib_target_compile "$testcase" "$test_driver" "executable" ""]
|
|
||||||
|
|
||||||
if { $comp_output != "" } {
|
|
||||||
fail "Failed to compile $testcase.\n"
|
|
||||||
fail "$testcase"
|
|
||||||
} else {
|
|
||||||
pass "Compiled $testcase.\n"
|
|
||||||
set result [newlib_load $test_driver ""]
|
|
||||||
set status [lindex $result 0]
|
|
||||||
$status "$testcase"
|
|
||||||
}
|
}
|
||||||
|
newlib_pass_fail "$srcfile"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# newlib_pass_fail takes the basename of a test source file, which it
|
||||||
|
# compiles and runs.
|
||||||
|
|
||||||
|
proc newlib_pass_fail { srcfile } {
|
||||||
|
global srcdir objdir subdir
|
||||||
|
|
||||||
|
set fullsrcfile "$srcdir/$subdir/$srcfile"
|
||||||
|
|
||||||
|
set test_driver "$objdir/testsuite/[file rootname $srcfile].x"
|
||||||
|
|
||||||
|
set comp_output [newlib_target_compile "$fullsrcfile" "$test_driver" "executable" ""]
|
||||||
|
|
||||||
|
if { $comp_output != "" } {
|
||||||
|
fail "Failed to compile $fullsrcfile.\n"
|
||||||
|
fail "$fullsrcfile"
|
||||||
|
} else {
|
||||||
|
pass "Compiled $fullsrcfile.\n"
|
||||||
|
set result [newlib_load $test_driver ""]
|
||||||
|
set status [lindex $result 0]
|
||||||
|
$status "$fullsrcfile"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
load_lib passfail.exp
|
load_lib passfail.exp
|
||||||
|
|
||||||
set nonpassfailtests {
|
set exclude_list {
|
||||||
"UTF-8.c"
|
"UTF-8.c"
|
||||||
}
|
}
|
||||||
|
|
||||||
newlib_pass_fail $nonpassfailtests
|
newlib_pass_fail_all -x $exclude_list
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
load_lib passfail.exp
|
load_lib passfail.exp
|
||||||
|
|
||||||
set nonpassfailtests {
|
set exclude_list {
|
||||||
}
|
}
|
||||||
|
|
||||||
newlib_pass_fail $nonpassfailtests
|
newlib_pass_fail_all -x $exclude_list
|
||||||
|
|
Loading…
Reference in New Issue