diff options
author | sb <sb@openoffice.org> | 2010-10-01 15:26:11 +0200 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-10-01 15:26:11 +0200 |
commit | 3f086677021604d386477bbd5c91cc001b79e247 (patch) | |
tree | af9e512c74314a1ce736db7864e5860ddf6ec680 /solenv | |
parent | 67f0d752f0454754c03b6fbf47808af51a2daeac (diff) |
sb123: cherry-picked subsequenttests improvements from cws/sb129 -c 55b03b1b8257
Diffstat (limited to 'solenv')
-rwxr-xr-x | solenv/bin/subsequenttests | 39 |
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; } |