aboutsummaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-04-23 22:58:45 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-04-23 22:58:45 +0000
commit28dde78dde21f20ab5ee491455828c3cf338ad5c (patch)
tree2c57b0306afaeee9379a1d3c48f344e41a0adc28 /tests/runtests.pl
parent37171809f67ae29adb9a5e7f64861d483049d86f (diff)
Added <postcheck> support to the test harness.
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-xtests/runtests.pl22
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index ec4b888ac..492eed392 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -1633,6 +1633,7 @@ sub singletest {
my $dumped_core;
my $cmdres;
+ # Apr 2007: precommand isn't being used and could be removed
my @precommand= getpart("client", "precommand");
if($precommand[0]) {
# this is pure perl to eval!
@@ -1654,7 +1655,7 @@ sub singletest {
}
# run the command line we built
if ($torture) {
- return torture($CMDLINE,
+ $cmdres = torture($CMDLINE,
"$gdb --directory libtest $DBGCURL -x log/gdbcmd");
}
elsif($gdbthis) {
@@ -1692,6 +1693,20 @@ sub singletest {
}
}
+ # run the postcheck command
+ my @postcheck= getpart("client", "postcheck");
+ $cmd = $postcheck[0];
+ chomp $cmd;
+ subVariables \$cmd;
+ if($cmd) {
+ my $rc = system("$cmd");
+ if($rc != 0) {
+ logmsg "postcheck failure\n";
+ return 1;
+ }
+ logmsg "postchecked $cmd\n" if($verbose);
+ }
+
# remove the special FTP command file after each test!
unlink($FTPDCMD);
@@ -1700,6 +1715,11 @@ sub singletest {
$ENV{$e}=""; # clean up
}
+ # Don't bother doing verification on torture tests
+ if ($torture) {
+ return $cmdres;
+ }
+
my @err = getpart("verify", "errorcode");
my $errorcode = $err[0] || "0";
my $ok="";