summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Berg2013-09-19 09:21:17 +0000
committerChristoph Berg2013-09-19 09:21:17 +0000
commitae97938ddbfb8ce0e7e971ec0b6eec5f8f5b4302 (patch)
tree68850068fd5615d6c909bde6ef24372e181ad227
parent3d5ff343d2ed8ebf8ef4bf786f037ad07938af28 (diff)
Setting SKIP_NETWORK_TESTS will skip the new_version tests
Build daemons for Debian packages might not have network access, so provide a way to disable the tests depeding on networking
-rwxr-xr-xcheck_postgres.pl6
-rw-r--r--t/02_new_version_bc.t8
-rw-r--r--t/02_new_version_box.t8
-rw-r--r--t/02_new_version_cp.t8
-rw-r--r--t/02_new_version_pg.t8
-rw-r--r--t/02_new_version_tnm.t8
6 files changed, 38 insertions, 8 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index 77af60250..10e4c5c8e 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -9763,9 +9763,9 @@ Items not specifically attributed are by GSM (Greg Sabino Mullane).
Install man page in section 1. (Peter Eisentraut, bug 53, github issue 26)
- Order lock typs in check_locks output to make the ordering predictable; other
- minor test suite fixes
- (Christoph Berg)
+ Order lock typs in check_locks output to make the ordering predictable;
+ setting SKIP_NETWORK_TESTS will skip the new_version tests; other minor test
+ suite fixes. (Christoph Berg)
=item B<Version 2.20.1> June 24, 2013
diff --git a/t/02_new_version_bc.t b/t/02_new_version_bc.t
index 7e802db7c..c7b8c7a88 100644
--- a/t/02_new_version_bc.t
+++ b/t/02_new_version_bc.t
@@ -6,12 +6,18 @@ use 5.006;
use strict;
use warnings;
use Data::Dumper;
-use Test::More tests => 1;
+use Test::More;
use lib 't','.';
use CP_Testing;
use vars qw/$dbh $t/;
+if ($ENV{SKIP_NETWORK_TESTS}) {
+ plan (skip_all => 'Skipped because environment variable SKIP_NETWORK_TESTS is set');
+} else {
+ plan tests => 1;
+}
+
my $cp = CP_Testing->new( {default_action => 'new_version_bc'} );
$dbh = $cp->test_database_handle();
diff --git a/t/02_new_version_box.t b/t/02_new_version_box.t
index b41539b8e..3f6c08183 100644
--- a/t/02_new_version_box.t
+++ b/t/02_new_version_box.t
@@ -6,12 +6,18 @@ use 5.006;
use strict;
use warnings;
use Data::Dumper;
-use Test::More tests => 1;
+use Test::More;
use lib 't','.';
use CP_Testing;
use vars qw/$dbh $t/;
+if ($ENV{SKIP_NETWORK_TESTS}) {
+ plan (skip_all => 'Skipped because environment variable SKIP_NETWORK_TESTS is set');
+} else {
+ plan tests => 1;
+}
+
my $cp = CP_Testing->new( {default_action => 'new_version_box'} );
$dbh = $cp->test_database_handle();
diff --git a/t/02_new_version_cp.t b/t/02_new_version_cp.t
index dc47b0196..8e7180165 100644
--- a/t/02_new_version_cp.t
+++ b/t/02_new_version_cp.t
@@ -6,12 +6,18 @@ use 5.006;
use strict;
use warnings;
use Data::Dumper;
-use Test::More tests => 4;
+use Test::More;
use lib 't','.';
use CP_Testing;
use vars qw/$dbh $t $info/;
+if ($ENV{SKIP_NETWORK_TESTS}) {
+ plan (skip_all => 'Skipped because environment variable SKIP_NETWORK_TESTS is set');
+} else {
+ plan tests => 4;
+}
+
my $cp = CP_Testing->new( {default_action => 'new_version_cp'} );
$dbh = $cp->test_database_handle();
diff --git a/t/02_new_version_pg.t b/t/02_new_version_pg.t
index 2829f86f6..dd4345bc1 100644
--- a/t/02_new_version_pg.t
+++ b/t/02_new_version_pg.t
@@ -6,12 +6,18 @@ use 5.006;
use strict;
use warnings;
use Data::Dumper;
-use Test::More tests => 5;
+use Test::More;
use lib 't','.';
use CP_Testing;
use vars qw/$dbh $t/;
+if ($ENV{SKIP_NETWORK_TESTS}) {
+ plan (skip_all => 'Skipped because environment variable SKIP_NETWORK_TESTS is set');
+} else {
+ plan tests => 5;
+}
+
my $cp = CP_Testing->new( {default_action => 'new_version_pg'} );
$dbh = $cp->test_database_handle();
diff --git a/t/02_new_version_tnm.t b/t/02_new_version_tnm.t
index 5d1b253d8..bf106054e 100644
--- a/t/02_new_version_tnm.t
+++ b/t/02_new_version_tnm.t
@@ -6,12 +6,18 @@ use 5.006;
use strict;
use warnings;
use Data::Dumper;
-use Test::More tests => 1;
+use Test::More;
use lib 't','.';
use CP_Testing;
use vars qw/$dbh $t/;
+if ($ENV{SKIP_NETWORK_TESTS}) {
+ plan (skip_all => 'Skipped because environment variable SKIP_NETWORK_TESTS is set');
+} else {
+ plan tests => 1;
+}
+
my $cp = CP_Testing->new( {default_action => 'new_version_tnm'} );
$dbh = $cp->test_database_handle();