diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2024-10-16 20:18:48 -0400 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2024-10-28 08:29:27 +0000 |
commit | c220250e93a4b4312fd98fc74d718bc1c25e8e4e (patch) | |
tree | c18a165ad6053bd6f47ef6ca9d4bf1a049ce4278 /gcc | |
parent | 98f04ecc1c36598de2706e194c650c8bbd2c2c37 (diff) | |
download | gcc-c220250e93a4b4312fd98fc74d718bc1c25e8e4e.zip gcc-c220250e93a4b4312fd98fc74d718bc1c25e8e4e.tar.gz gcc-c220250e93a4b4312fd98fc74d718bc1c25e8e4e.tar.bz2 |
Improve path handling while testing name resolution 2.0
gcc/testsuite/ChangeLog:
* rust/compile/nr2/compile.exp: Handle paths using "file join"
and "file split".
* rust/compile/nr2/exclude: Remove debug-diagnostics-on.rs.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/rust/compile/nr2/compile.exp | 18 | ||||
-rw-r--r-- | gcc/testsuite/rust/compile/nr2/exclude | 5 |
2 files changed, 9 insertions, 14 deletions
diff --git a/gcc/testsuite/rust/compile/nr2/compile.exp b/gcc/testsuite/rust/compile/nr2/compile.exp index 0afe36c..f2724f6 100644 --- a/gcc/testsuite/rust/compile/nr2/compile.exp +++ b/gcc/testsuite/rust/compile/nr2/compile.exp @@ -44,23 +44,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}} 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] } } diff --git a/gcc/testsuite/rust/compile/nr2/exclude b/gcc/testsuite/rust/compile/nr2/exclude index 57bcca0..450fc25 100644 --- a/gcc/testsuite/rust/compile/nr2/exclude +++ b/gcc/testsuite/rust/compile/nr2/exclude @@ -1,8 +1,3 @@ -# relies on exact source file path match -# TODO: patch this file or nr2/compile.exp to handle this -debug-diagnostics-on.rs - -# main list attr-mismatch-crate-name.rs attr_deprecated.rs attr_deprecated_2.rs |