diff options
Diffstat (limited to 'gcc/testsuite/rust/compile/nr2')
-rw-r--r-- | gcc/testsuite/rust/compile/nr2/compile.exp | 134 | ||||
-rw-r--r-- | gcc/testsuite/rust/compile/nr2/exclude | 33 |
2 files changed, 0 insertions, 167 deletions
diff --git a/gcc/testsuite/rust/compile/nr2/compile.exp b/gcc/testsuite/rust/compile/nr2/compile.exp deleted file mode 100644 index 35637f1..0000000 --- a/gcc/testsuite/rust/compile/nr2/compile.exp +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright (C) 2021-2024 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -# Run compile tests with name resolution 2.0 enabled - -# Load support procs. -load_lib rust-dg.exp - -# Initialize `dg'. -dg-init - -namespace eval rust-nr2-ns { - # Exclude tests which aren't passing yet - # These should be removed from the exclude file over time - - set exclude_fh [open $srcdir/$subdir/exclude r] - set exclude_raw [lsort [split [read $exclude_fh] "\n"]] - close $exclude_fh - unset exclude_fh - - set exclude "" - foreach ent $exclude_raw { - if [regexp {^[^#].*} $ent] { - lappend exclude $ent - } - } - unset exclude_raw - - # Run tests in directories - # Manually specifying these, in case some other test file - # does something weird - set test_dirs {{} {macros builtin} {macros mbe} {macros proc} {torture}} - - set tests_expect_ok "" - set tests_expect_err "" - - foreach test_dir $test_dirs { - 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 [file join {*}$directory $test] - } else { - lappend tests_expect_err [file join {*}$directory $test] - set exclude [lreplace $exclude $idx $idx] - } - } - } - - # Generate failures for unmatched tests in the exclude list - foreach ent $exclude { - fail "$ent: could not exclude test" - } - unset exclude - - # run a test while catching record_test calls - set record_test_out "" - proc try_test { test } { - variable record_test_out - rename ::record_test record_test_old - - proc ::record_test { type msg args } { - namespace eval ::rust-nr2-ns { - set type [uplevel 1 {set type}] - set msg [uplevel 1 {set msg}] - variable record_test_out - switch $type { - FAIL { - lappend record_test_out "$type: $msg" - } - XPASS { - lappend record_test_out "$type: $msg" - } - } - } - } - - namespace eval :: { - set saved-dg-do-what-default ${dg-do-what-default} - set dg-do-what-default "compile" - dg-runtest [list [uplevel 1 {set test}]] "-frust-name-resolution-2.0" "" - set dg-do-what-default ${saved-dg-do-what-default} - } - - rename ::record_test "" - rename record_test_old ::record_test - - set record_test_cache $record_test_out - set record_test_out "" - return $record_test_cache - } - - # check for unexpected failures - foreach test $tests_expect_ok { - set fails [try_test $test] - if {[llength $fails] != 0} { - foreach ent $fails { - record_test FAIL "$test: nr2 failure: $ent" - } - } else { - record_test PASS "$test: nr2 success" - } - } - - #check for unexpected successes - foreach test $tests_expect_err { - set fails [try_test $test] - if {[llength $fails] == 0} { - record_test XPASS "$test: nr2 unexpectedly passed" - } else { - record_test XFAIL "$test: nr2 was rightfully excluded" - } - } -} - -# All done. -dg-finish diff --git a/gcc/testsuite/rust/compile/nr2/exclude b/gcc/testsuite/rust/compile/nr2/exclude deleted file mode 100644 index 19bf6f8..0000000 --- a/gcc/testsuite/rust/compile/nr2/exclude +++ /dev/null @@ -1,33 +0,0 @@ -canonical_paths1.rs -cfg1.rs -generics9.rs -issue-2043.rs -issue-2812.rs -issue-3315-2.rs -lookup_err1.rs -macros/mbe/macro6.rs -multiple_bindings1.rs -multiple_bindings2.rs -privacy5.rs -privacy8.rs -pub_restricted_1.rs -pub_restricted_2.rs -pub_restricted_3.rs -undeclared_label.rs -use_1.rs -while_break_expr.rs -issue-2905-2.rs -issue-266.rs -derive_clone_enum3.rs -derive-debug1.rs -derive-default1.rs -issue-3402-1.rs -issue-3403.rs -derive-eq-invalid.rs -derive-hash1.rs -torture/alt_patterns1.rs -torture/loop4.rs -torture/loop8.rs -torture/name_resolve1.rs -issue-3568.rs -# please don't delete the trailing newline |