diff options
Diffstat (limited to 'gcc/testsuite/rust/compile/nr2/compile.exp')
-rw-r--r-- | gcc/testsuite/rust/compile/nr2/compile.exp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/gcc/testsuite/rust/compile/nr2/compile.exp b/gcc/testsuite/rust/compile/nr2/compile.exp index 0afe36c..35637f1 100644 --- a/gcc/testsuite/rust/compile/nr2/compile.exp +++ b/gcc/testsuite/rust/compile/nr2/compile.exp @@ -14,9 +14,7 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# Compile tests, no torture testing, for name resolution 2.0 -# -# These tests raise errors in the front end; torture testing doesn't apply. +# Run compile tests with name resolution 2.0 enabled # Load support procs. load_lib rust-dg.exp @@ -44,23 +42,23 @@ namespace eval rust-nr2-ns { # Run tests in directories # Manually specifying these, in case some other test file # does something weird - set test_dirs {. compile macros/builtin macros/mbe macros/proc} + set test_dirs {{} {macros builtin} {macros mbe} {macros proc} {torture}} set tests_expect_ok "" set tests_expect_err "" foreach test_dir $test_dirs { - foreach test [lsort [glob -nocomplain -tails -directory $srcdir/$subdir/../$test_dir *.rs]] { - if {$test_dir == "."} { - set test_lbl $test - } else { - set test_lbl "$test_dir/$test" - } + set directory [list {*}[file split $srcdir] {*}[file split $subdir]] + set directory [lreplace $directory end end] + set directory [list {*}$directory {*}$test_dir] + foreach test [lsort [glob -nocomplain -tails -directory [file join {*}$directory] *.rs]] { + # use '/' as the path seperator for entries in the exclude file + set test_lbl [join [list {*}$test_dir $test] "/"] set idx [lsearch -exact -sorted $exclude $test_lbl] if {$idx == -1} { - lappend tests_expect_ok $srcdir/$subdir/../$test_dir/$test + lappend tests_expect_ok [file join {*}$directory $test] } else { - lappend tests_expect_err $srcdir/$subdir/../$test_dir/$test + lappend tests_expect_err [file join {*}$directory $test] set exclude [lreplace $exclude $idx $idx] } } |