[lintian] 01/02: t: Split strict.t and let it run in parallel
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit ea229dffdfc4d0a49b44cc1e1761e9a02bbfef40
Author: Niels Thykier <niels@thykier.net>
Date: Sat Apr 2 12:04:59 2016 +0000
t: Split strict.t and let it run in parallel
Signed-off-by: Niels Thykier <niels@thykier.net>
---
t/scripts/03-strict/checks.t | 1 +
t/scripts/03-strict/collection.t | 1 +
t/scripts/03-strict/commands.t | 1 +
t/scripts/03-strict/docs-examples.t | 1 +
t/scripts/03-strict/frontend.t | 1 +
t/scripts/03-strict/helpers.t | 1 +
t/scripts/03-strict/lib.t | 1 +
t/scripts/03-strict/private.t | 1 +
t/scripts/03-strict/reporting.t | 1 +
t/scripts/{strict.t => 03-strict/runner.pl} | 16 +++++++++-------
t/scripts/03-strict/test-scripts.t | 1 +
11 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/t/scripts/03-strict/checks.t b/t/scripts/03-strict/checks.t
new file mode 120000
index 0000000..c316f2d
--- /dev/null
+++ b/t/scripts/03-strict/checks.t
@@ -0,0 +1 @@
+runner.pl
\ No newline at end of file
diff --git a/t/scripts/03-strict/collection.t b/t/scripts/03-strict/collection.t
new file mode 120000
index 0000000..c316f2d
--- /dev/null
+++ b/t/scripts/03-strict/collection.t
@@ -0,0 +1 @@
+runner.pl
\ No newline at end of file
diff --git a/t/scripts/03-strict/commands.t b/t/scripts/03-strict/commands.t
new file mode 120000
index 0000000..c316f2d
--- /dev/null
+++ b/t/scripts/03-strict/commands.t
@@ -0,0 +1 @@
+runner.pl
\ No newline at end of file
diff --git a/t/scripts/03-strict/docs-examples.t b/t/scripts/03-strict/docs-examples.t
new file mode 120000
index 0000000..c316f2d
--- /dev/null
+++ b/t/scripts/03-strict/docs-examples.t
@@ -0,0 +1 @@
+runner.pl
\ No newline at end of file
diff --git a/t/scripts/03-strict/frontend.t b/t/scripts/03-strict/frontend.t
new file mode 120000
index 0000000..c316f2d
--- /dev/null
+++ b/t/scripts/03-strict/frontend.t
@@ -0,0 +1 @@
+runner.pl
\ No newline at end of file
diff --git a/t/scripts/03-strict/helpers.t b/t/scripts/03-strict/helpers.t
new file mode 120000
index 0000000..c316f2d
--- /dev/null
+++ b/t/scripts/03-strict/helpers.t
@@ -0,0 +1 @@
+runner.pl
\ No newline at end of file
diff --git a/t/scripts/03-strict/lib.t b/t/scripts/03-strict/lib.t
new file mode 120000
index 0000000..c316f2d
--- /dev/null
+++ b/t/scripts/03-strict/lib.t
@@ -0,0 +1 @@
+runner.pl
\ No newline at end of file
diff --git a/t/scripts/03-strict/private.t b/t/scripts/03-strict/private.t
new file mode 120000
index 0000000..c316f2d
--- /dev/null
+++ b/t/scripts/03-strict/private.t
@@ -0,0 +1 @@
+runner.pl
\ No newline at end of file
diff --git a/t/scripts/03-strict/reporting.t b/t/scripts/03-strict/reporting.t
new file mode 120000
index 0000000..c316f2d
--- /dev/null
+++ b/t/scripts/03-strict/reporting.t
@@ -0,0 +1 @@
+runner.pl
\ No newline at end of file
diff --git a/t/scripts/strict.t b/t/scripts/03-strict/runner.pl
similarity index 63%
rename from t/scripts/strict.t
rename to t/scripts/03-strict/runner.pl
index a680c2c..953ca64 100755
--- a/t/scripts/strict.t
+++ b/t/scripts/03-strict/runner.pl
@@ -4,6 +4,7 @@ use strict;
use warnings;
use autodie;
+use Test::Lintian;
use Test::More;
if ($ENV{'LINTIAN_COVERAGE'}) {
plan 'skip_all' => 'Not needed for coverage of Lintian';
@@ -22,10 +23,11 @@ $ENV{'LINTIAN_TEST_ROOT'} //= '.';
# BEGIN, so make sure it is present for them.
$ENV{'LINTIAN_INCLUDE_DIRS'} = $ENV{'LINTIAN_TEST_ROOT'};
-my @DIRS = map { "$ENV{'LINTIAN_TEST_ROOT'}/$_" }
- qw(lib private frontend helpers collection checks commands doc/examples/checks);
-all_perl_files_ok(@DIRS);
-
-# html_reports loads ./config, so we have do chdir before checking it.
-chdir("$ENV{'LINTIAN_TEST_ROOT'}/reporting");
-all_perl_files_ok('.');
+if ($0 =~ m{^(?:.*/)?reporting\.t$}) {
+ # html_reports loads ./config, so we have do chdir before checking it.
+ chdir("$ENV{'LINTIAN_TEST_ROOT'}/reporting");
+ all_perl_files_ok('.');
+} else {
+ my @test_paths = program_name_to_perl_paths($0);
+ all_perl_files_ok(@test_paths);
+}
diff --git a/t/scripts/03-strict/test-scripts.t b/t/scripts/03-strict/test-scripts.t
new file mode 120000
index 0000000..c316f2d
--- /dev/null
+++ b/t/scripts/03-strict/test-scripts.t
@@ -0,0 +1 @@
+runner.pl
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: