Move C++ internals to prefixed names in dejagnu.h
[dejagnu.git] / testsuite / runtest.main / stats.exp
blobdd127fecf7fbbceb963d44cdfa6ad8800546bfc1
1 # Copyright (C) 1995-2016, 2018, 2020 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 tests pass/fail/etc.
20 # The way we do this is to recursively invoke ourselves on a small testsuite
21 # and analyze the results.
23 load_lib util-defs.exp
25 runtest_setup_nested_testsuite
27 set tests {
28     { stats pass "expected passes\[ \t\]+1\n" }
29     { stats fail "unexpected failures\[ \t\]+1\n" }
30     { stats xpass "unexpected successes\[ \t\]+1\n" }
31     { stats xfail "expected failures\[ \t\]+1\n" }
32     { stats kpass "unknown successes\[ \t\]+1\n" }
33     { stats kfail "known failures\[ \t\]+1\n" }
34     { stats untested "untested testcases\[ \t\]+1\n" }
35     { stats unresolved "unresolved testcases\[ \t\]+1\n" }
36     { stats unsupported "unsupported tests\[ \t\]+1\n" }
38     { unit pass "expected passes\[ \t\]+1\n" }
39     { unit fail "unexpected failures\[ \t\]+1\n" }
40     { unit xpass "unexpected successes\[ \t\]+1\n" }
41     { unit xfail "expected failures\[ \t\]+1\n" }
42     { unit untested "untested testcases\[ \t\]+1\n" }
43     { unit unresolved "unresolved testcases\[ \t\]+1\n" }
44     { unit unsupported "unsupported tests\[ \t\]+1\n" }
47 foreach t $tests {
48     if { [util_test $RUNTEST \
49             "--local_init nested-init.exp --tool stat\
50                 STATS_TEST=[lindex $t 1] [lindex $t 0]-sub.exp" \
51             "" \
52             [lindex $t 2]] } {
53         fail "[lindex $t 0]/[lindex $t 1]"
54         runtest_copy_nested_testsuite_log stat
55     } else {
56         pass "[lindex $t 0]/[lindex $t 1]"
57     }
60 runtest_cleanup_nested_testsuite