$name =~ s/\n//g;
my $env = <IN>;
$env =~ s/\n//g;
+ my $loadlist;
+ if ($supports_loadlist) {
+ $loadlist = <IN>;
+ $loadlist =~ s/\n//g;
+ }
my $cmdline = <IN>;
$cmdline =~ s/\n//g;
if (should_run_test($name) == 1) {
- push (@ret, [$name, $env, $cmdline, $supports_loadlist]);
+ push (@ret, [$name, $env, $cmdline, $loadlist]);
}
} else {
print;
teardown_env($testenv_name);
} elsif ($opt_list) {
foreach (@todo) {
- my $cmd = $$_[2];
my $name = $$_[0];
my $envname = $$_[1];
+ my $cmd = $$_[2];
+ my $listcmd = $$_[3];
- unless($cmd =~ /\$LISTOPT/) {
+ unless (defined($listcmd)) {
warn("Unable to list tests in $name");
# Rather than ignoring this testsuite altogether, just pretend the entire testsuite is
# a single "test".
next;
}
- $cmd =~ s/\$LISTOPT/--list/g;
-
- system($cmd);
+ system($listcmd);
if ($? == -1) {
- die("Unable to run $cmd: $!");
+ die("Unable to run $listcmd: $!");
} elsif ($? & 127) {
- die(sprintf("%s died with signal %d, %s coredump\n", $cmd, ($? & 127), ($? & 128) ? 'with' : 'without'));
+ die(sprintf("%s died with signal %d, %s coredump\n", $listcmd, ($? & 127), ($? & 128) ? 'with' : 'without'));
}
my $exitcode = $? >> 8;