1 # Copyright (C) 2022 Free Software Foundation, Inc.
3 # This file is part of DejaGnu.
5 # DejaGnu is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # DejaGnu is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with DejaGnu; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19 # This file is a regression test for PR53427, where the running count of
20 # errors (and warnings) propagates from one test file to the next. This
21 # causes the first test in the second file to be spuriously UNRESOLVED.
23 runtest_setup_nested_testsuite
25 proc test_pr53427 {} {
28 foreach test_mode {error warning} {
31 set cmd_args [list --local_init nested-init.exp --tool pr53427 \
34 verbose -log "Spawning $RUNTEST $cmd_args ..."
35 eval [list spawn $RUNTEST] $cmd_args
37 -re { of expected passes[[:space:]]+([[:digit:]]+)[\r\n]+} {
38 set pass_count $expect_out(1,string)
41 -re { of unresolved testcases} {
46 # Were the expected number of passed tests reported?
47 if { $result eq "unresolved" && $pass_count == 4 } { set result pass }
49 $result "PR53427 test for $test_mode isolation between test files"
55 runtest_cleanup_nested_testsuite