Blame testsuite/runtest.all/stats.exp

Packit 62fe53
# Copyright (C) 1995-2016 Free Software Foundation, Inc.
Packit 62fe53
#
Packit 62fe53
# This file is part of DejaGnu.
Packit 62fe53
#
Packit 62fe53
# DejaGnu is free software; you can redistribute it and/or modify it
Packit 62fe53
# under the terms of the GNU General Public License as published by
Packit 62fe53
# the Free Software Foundation; either version 3 of the License, or
Packit 62fe53
# (at your option) any later version.
Packit 62fe53
#
Packit 62fe53
# DejaGnu is distributed in the hope that it will be useful, but
Packit 62fe53
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 62fe53
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 62fe53
# General Public License for more details.
Packit 62fe53
#
Packit 62fe53
# You should have received a copy of the GNU General Public License
Packit 62fe53
# along with DejaGnu; if not, write to the Free Software Foundation,
Packit 62fe53
# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
Packit 62fe53
Packit 62fe53
# This file tests pass/fail/etc.
Packit 62fe53
# The way we do this is to recursively invoke ourselves on a small testsuite
Packit 62fe53
# and analyze the results.
Packit 62fe53
Packit 62fe53
load_lib util-defs.exp
Packit 62fe53
Packit 62fe53
if ![info exists tmpdir] {
Packit 62fe53
    set tmpdir $objdir/tmpdir
Packit 62fe53
}
Packit 62fe53
Packit 62fe53
if ![file isdirectory $tmpdir] {
Packit 62fe53
    catch "file mkdir $tmpdir"
Packit 62fe53
}
Packit 62fe53
Packit 62fe53
set tests {
Packit 62fe53
    { pass "expected passes\[ \t\]+1\n" }
Packit 62fe53
    { fail "unexpected failures\[ \t\]+1\n" }
Packit 62fe53
    { xpass "unexpected successes\[ \t\]+1\n" }
Packit 62fe53
    { xfail "expected failures\[ \t\]+1\n" }
Packit 62fe53
    { kpass "unknown successes\[ \t\]+1\n" }
Packit 62fe53
    { kfail "known failures\[ \t\]+1\n" }
Packit 62fe53
    { untested "untested testcases\[ \t\]+1\n" }
Packit 62fe53
    { unresolved "unresolved testcases\[ \t\]+1\n" }
Packit 62fe53
    { unsupported "unsupported tests\[ \t\]+1\n" }
Packit 62fe53
}
Packit 62fe53
Packit 62fe53
foreach t $tests {
Packit 62fe53
    if [util_test "$RUNTEST" \
Packit 62fe53
	    "--outdir $tmpdir STATS_TEST=[lindex $t 0] stats-sub.exp" \
Packit 62fe53
	    "" \
Packit 62fe53
	    [lindex $t 1]] {
Packit 62fe53
	fail [lindex $t 0]
Packit 62fe53
    } else {
Packit 62fe53
	pass [lindex $t 0]
Packit 62fe53
    }
Packit 62fe53
}
Packit 62fe53
Packit 62fe53
file delete -force $tmpdir