From e3ceb872bf58d5eb1490b39d19bf29194f47949c Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 14 Sep 2010 09:15:02 +0200 Subject: [PATCH] sb129: #i113189# adapted tests; improved subsequenttests --- solenv/bin/subsequenttests | 39 ++++++++++++++++++++++++++++++++------ solenv/inc/settings.mk | 4 +++- 2 files changed, 36 insertions(+), 7 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"; - print STDERR " -P number of parallel dmake invocations\n"; - print STDERR " 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"; + 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 number of parallel dmake invocations\n"; + print STDERR " 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; } diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk index c24ab9d72d2c..2eaf75e9f3be 100644 --- a/solenv/inc/settings.mk +++ b/solenv/inc/settings.mk @@ -1363,7 +1363,9 @@ COMPONENTPREFIX_BASIS_NATIVE = vnd.sun.star.expand:$$OOO_BASE_DIR/program/ .END COMPONENTPREFIX_BASIS_JAVA = vnd.sun.star.expand:$$OOO_BASE_DIR/program/classes/ COMPONENTPREFIX_BASIS_PYTHON = vnd.openoffice.pymodule: -COMPONENTPREFIX_INBUILD = vnd.sun.star.expand:$$OOO_INBUILD_SHAREDLIB_DIR/ +COMPONENTPREFIX_INBUILD_NATIVE = \ + vnd.sun.star.expand:$$OOO_INBUILD_SHAREDLIB_DIR/ +COMPONENTPREFIX_INBUILD_JAVA = vnd.sun.star.expand:$$OOO_INBUILD_JAR_DIR/ # workaround for strange dmake bug: # if the previous block was a rule or a target, "\#" isn't recognized