summaryrefslogtreecommitdiff
path: root/solenv/bin/subsequenttests
diff options
context:
space:
mode:
Diffstat (limited to 'solenv/bin/subsequenttests')
-rwxr-xr-xsolenv/bin/subsequenttests39
1 files changed, 33 insertions, 6 deletions
diff --git a/solenv/bin/subsequenttests b/solenv/bin/subsequenttests
index 3caa84293f3e..8b52f45a6b12 100755
--- a/solenv/bin/subsequenttests
+++ b/solenv/bin/subsequenttests
@@ -30,6 +30,8 @@ eval 'exec "$PERL" -Sw "$0" "$@"'
use lib("$ENV{SOLARENV}/bin/modules");
use SourceConfig;
+my $keep_going = 0;
+my $dry_run = 0;
my $max_running = 1;
while (@ARGV) {
my $arg = shift(@ARGV);
@@ -38,11 +40,29 @@ while (@ARGV) {
} elsif ($arg eq '--') {
last;
} else {
- print STDERR "unknown argument \"$arg\"\n";
- print STDERR "usage: $0 [-P<n>] [-- <args>]\n";
- print STDERR " -P<n> number of parallel dmake invocations\n";
- print STDERR " <args> are passed to dmake invocations\n";
- exit(1);
+ my $n = substr($arg, 0, 1) eq '-' ? 1 : 0;
+ while ($n && $n < length($arg)) {
+ my $c = substr($arg, $n++, 1);
+ if ($c eq 'k') {
+ $keep_going = 1;
+ } elsif ($c eq 'n') {
+ $dry_run = 1;
+ } else {
+ $n = 0;
+ last;
+ }
+ }
+ if (!$n) {
+ print STDERR "unknown argument \"$arg\"\n";
+ print STDERR "usage: $0 [-kn] [-P<n>] [-- <args>]\n";
+ print STDERR " -k continue with other dmake invocations upon\n";
+ print STDERR " failure\n";
+ print STDERR " -n write directories that would be processed\n";
+ print STDERR " to standard output\n";
+ print STDERR " -P<n> number of parallel dmake invocations\n";
+ print STDERR " <args> are passed to dmake invocations\n";
+ exit(1);
+ }
}
}
@@ -82,6 +102,13 @@ foreach $module ($sc->get_active_modules()) {
}
}
+if ($dry_run) {
+ foreach $path (@testpaths) {
+ print "$path\n";
+ }
+ exit(0);
+}
+
my $cmd = 'dmake';
foreach (@ARGV) {
s/'/'\''/g;
@@ -119,8 +146,8 @@ while (@testpaths || $running > 0) {
my $testpath = delete($pids{$pid});
defined($testpath) or die("unmatched PID $pid");
if ($? != 0) {
- @testpaths = ();
push(@failedpaths, $testpath);
+ @testpaths = () unless $keep_going;
}
--$running;
}