[SCM] Debian package checker branch, master, updated. 2.2.10-20-g2b065d3
The following commit has been merged in the master branch:
commit ab2297ef01a6bc3dda508b1c90b898fdcc6cdea6
Author: Raphael Geissert <atomo64@gmail.com>
Date: Fri May 8 10:01:03 2009 -0500
Change the order by which tests are run
Since the Harness test scripts work at a lower level they should be the first
to be run, requiring t/runtests to be run before testset/runtests in
debian/rules.
diff --git a/debian/rules b/debian/rules
index 49352c1..ce42ab5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,8 +18,8 @@ runtests: $(neededfiles) $(allchecks) $(allcollect) $(tagfiles) $(testfiles)
@echo .... running tests ....
rm -rf debian/tests
mkdir debian/tests
- LINTIAN_ROOT="" $(PERL) testset/runtests -k testset debian/tests $(onlyrun)
LINTIAN_ROOT="" $(PERL) t/runtests -k t debian/tests $(onlyrun)
+ LINTIAN_ROOT="" $(PERL) testset/runtests -k testset debian/tests $(onlyrun)
if [ "$(onlyrun)" = "" ]; then touch $@; fi
# Like runtests but only runs tests affecting a particular tag. That tag
diff --git a/t/runtests b/t/runtests
index 0acf1fb..05dddb6 100755
--- a/t/runtests
+++ b/t/runtests
@@ -125,9 +125,36 @@ my $status = 0;
# anything.
my $tests_run = 0;
+my @tests;
+my $prev;
+
+# --- Run all test scripts
+
+$prev = $prev || scalar(@tests);
+@tests = ();
+if ($singletest) {
+ my $script = "$TESTSET/scripts/$singletest.t";
+ if (-f $script) {
+ @tests = ($script);
+ }
+} else {
+ unless (-d "$TESTSET/scripts") {
+ fail("cannot find $TESTSET/scripts: $!");
+ }
+ @tests = ("$TESTSET/scripts");
+}
+print "\n" if ($prev and @tests);
+if (@tests) {
+ print "Test scripts:\n";
+ if (system('prove', '-I', "$LINTIAN_ROOT/lib", @tests) != 0) {
+ exit 1 unless $run_all_tests;
+ $status = 1;
+ }
+ $tests_run++;
+}
+
# --- Run all changes tests
-my @tests;
if ($singletest) {
my $test = $singletest;
$test =~ s/\.changes$//;
@@ -159,7 +186,7 @@ for (@tests) {
# --- Run all debs tests
-my $prev = scalar(@tests);
+$prev = scalar(@tests);
@tests = ();
if ($singletest) {
my $test = $singletest;
@@ -272,31 +299,6 @@ for my $test (@tests) {
$tests_run++;
}
-# --- Run all test scripts
-
-$prev = $prev || scalar(@tests);
-@tests = ();
-if ($singletest) {
- my $script = "$TESTSET/scripts/$singletest.t";
- if (-f $script) {
- @tests = ($script);
- }
-} else {
- unless (-d "$TESTSET/scripts") {
- fail("cannot find $TESTSET/scripts: $!");
- }
- @tests = ("$TESTSET/scripts");
-}
-print "\n" if ($prev and @tests);
-if (@tests) {
- print "Test scripts:\n";
- if (system('prove', '-I', "$LINTIAN_ROOT/lib", @tests) != 0) {
- exit 1 unless $run_all_tests;
- $status = 1;
- }
- $tests_run++;
-}
-
# --- Check whether we ran any tests
if (!$tests_run) {
--
Debian package checker
Reply to: