[lintian] 01/01: t/runtests: Add -B option to always rebuild packages
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 5a466a92003544310f8a773ea6f5b5ecfd13265e
Author: Niels Thykier <niels@thykier.net>
Date: Wed Aug 12 10:04:00 2015 +0200
t/runtests: Add -B option to always rebuild packages
Useful for forcing a rebuild of the test packages when there is a
change the test runner cannot see. Examples include:
* deleted files
* new versions of build dependencies
Signed-off-by: Niels Thykier <niels@thykier.net>
---
t/runtests | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/t/runtests b/t/runtests
index 6d8498c..e93a0fe 100755
--- a/t/runtests
+++ b/t/runtests
@@ -122,6 +122,8 @@ sub usage {
: of jobs started is <nproc>+1.
: -k Do not stop after one failed test
: -v Be more verbose
+: -B Always (re)build packages, even if they appear to be up
+: to date
: --help, -h Print this help and exit
:
: The optional 3rd parameter causes runtests to only run tests that match
@@ -158,8 +160,7 @@ END
our $DEBUG = 0;
our $VERBOSE = 0;
-our $RUNDIR;
-our $TESTSET;
+our ($RUNDIR, $TESTSET, $ALWAYS_REBUILD);
our $JOBS = -1;
our $DUMP_LOGS = '';
@@ -374,6 +375,7 @@ exit $status;
sub parse_args {
Getopt::Long::Configure('bundling');
GetOptions(
+ 'B' => \$ALWAYS_REBUILD,
'd|debug' => \$DEBUG,
'j|jobs:i' => \$JOBS,
'k|keep-going' => \$run_all_tests,
@@ -468,7 +470,7 @@ sub test_package {
}
}
- if (not up_to_date($stampfile, $origdir, $RUNNER_TS)) {
+ if ($ALWAYS_REBUILD or not up_to_date($stampfile, $origdir, $RUNNER_TS)) {
my $tmpldir = "$TESTSET/templates/$suite/";
my $skel = $testdata->{skeleton};
my $is_native = ($testdata->{type} eq 'native');
@@ -715,7 +717,7 @@ sub generic_test_runner {
}
}
- if (not up_to_date($stampfile, $testdir, $RUNNER_TS)) {
+ if ($ALWAYS_REBUILD or not up_to_date($stampfile, $testdir, $RUNNER_TS)) {
my $skel = $testdata->{skeleton};
my $tmpldir = "$TESTSET/templates/$suite/";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: