Simplify test skipping
Change-Id: I45ca4998e50f60849f6f44544f3c8d22f33ac91c
diff --git a/t/script/archive.t b/t/script/archive.t
index 93edc8d..5c23b76 100644
--- a/t/script/archive.t
+++ b/t/script/archive.t
@@ -14,6 +14,10 @@
use KorAP::XML::Archive;
use utf8;
+if ($ENV{SKIP_SCRIPT}) {
+ plan skip_all => 'Skip script tests';
+};
+
my $f = dirname(__FILE__);
my $script = catfile($f, '..', '..', 'script', 'korapxml2krill');
diff --git a/t/script/archive_tar.t b/t/script/archive_tar.t
index a31e9b0..1dfd195 100644
--- a/t/script/archive_tar.t
+++ b/t/script/archive_tar.t
@@ -14,6 +14,10 @@
use KorAP::XML::Archive;
use utf8;
+if ($ENV{SKIP_SCRIPT}) {
+ plan skip_all => 'Skip script tests';
+};
+
my $f = dirname(__FILE__);
my $script = catfile($f, '..', '..', 'script', 'korapxml2krill');
diff --git a/t/script/archive_tar_tempextract.t b/t/script/archive_tar_tempextract.t
index 2934324..7957029 100644
--- a/t/script/archive_tar_tempextract.t
+++ b/t/script/archive_tar_tempextract.t
@@ -15,6 +15,10 @@
use KorAP::XML::Archive;
use utf8;
+if ($ENV{SKIP_SCRIPT}) {
+ plan skip_all => 'Skip script tests';
+};
+
my $f = dirname(__FILE__);
my $script = catfile($f, '..', '..', 'script', 'korapxml2krill');
diff --git a/t/script/base.t b/t/script/base.t
index 7bfe48d..41744ec 100644
--- a/t/script/base.t
+++ b/t/script/base.t
@@ -12,6 +12,10 @@
use Data::Dumper;
use utf8;
+if ($ENV{SKIP_SCRIPT}) {
+ plan skip_all => 'Skip script tests';
+};
+
my $f = dirname(__FILE__);
my $script = catfile($f, '..', '..', 'script', 'korapxml2krill');
diff --git a/t/script/config.t b/t/script/config.t
index 628409b..9ca2a36 100644
--- a/t/script/config.t
+++ b/t/script/config.t
@@ -9,6 +9,10 @@
use Test::Output qw/combined_from/;
use Data::Dumper;
+if ($ENV{SKIP_SCRIPT}) {
+ plan skip_all => 'Skip script tests';
+};
+
my $f = dirname(__FILE__);
my ($fh, $cfg_file) = tempfile();
diff --git a/t/script/extract.t b/t/script/extract.t
index 084908b..e2e9640 100644
--- a/t/script/extract.t
+++ b/t/script/extract.t
@@ -12,6 +12,10 @@
use KorAP::XML::Archive;
use utf8;
+if ($ENV{SKIP_SCRIPT}) {
+ plan skip_all => 'Skip script tests';
+};
+
my $f = dirname(__FILE__);
my $script = catfile($f, '..', '..', 'script', 'korapxml2krill');
diff --git a/t/script/non_verbal_tokens.t b/t/script/non_verbal_tokens.t
index ddb8607..b128a3b 100644
--- a/t/script/non_verbal_tokens.t
+++ b/t/script/non_verbal_tokens.t
@@ -12,6 +12,10 @@
use Data::Dumper;
use utf8;
+if ($ENV{SKIP_SCRIPT}) {
+ plan skip_all => 'Skip script tests';
+};
+
my $f = dirname(__FILE__);
my $script = catfile($f, '..', '..', 'script', 'korapxml2krill');
diff --git a/t/script/non_word_tokens.t b/t/script/non_word_tokens.t
index b156866..6f2a525 100644
--- a/t/script/non_word_tokens.t
+++ b/t/script/non_word_tokens.t
@@ -12,6 +12,10 @@
use Data::Dumper;
use utf8;
+if ($ENV{SKIP_SCRIPT}) {
+ plan skip_all => 'Skip script tests';
+};
+
my $f = dirname(__FILE__);
my $script = catfile($f, '..', '..', 'script', 'korapxml2krill');
diff --git a/t/script/serial.t b/t/script/serial.t
index ab71634..a4a64f1 100644
--- a/t/script/serial.t
+++ b/t/script/serial.t
@@ -6,6 +6,10 @@
use File::Spec::Functions qw/catdir catfile/;
use File::Temp qw/:POSIX/;
+if ($ENV{SKIP_SCRIPT}) {
+ plan skip_all => 'Skip script tests';
+};
+
my $f = dirname(__FILE__);
my $script = catfile($f, '..', '..', 'script', 'korapxml2krill');
diff --git a/t/script/single.t b/t/script/single.t
index 8f2c4db..dddf7d8 100644
--- a/t/script/single.t
+++ b/t/script/single.t
@@ -12,6 +12,10 @@
use Data::Dumper;
use utf8;
+if ($ENV{SKIP_SCRIPT}) {
+ plan skip_all => 'Skip script tests';
+};
+
my $f = dirname(__FILE__);
my $script = catfile($f, '..', '..', 'script', 'korapxml2krill');
diff --git a/t/script/usage.t b/t/script/usage.t
index be09872..28d66bc 100644
--- a/t/script/usage.t
+++ b/t/script/usage.t
@@ -11,6 +11,10 @@
use Test::Output;
use Data::Dumper;
+if ($ENV{SKIP_SCRIPT}) {
+ plan skip_all => 'Skip script tests';
+};
+
my $f = dirname(__FILE__);
my $script = catfile($f, '..', '..', 'script', 'korapxml2krill');
ok(-f $script, 'Script found');