Simplify test skipping
Change-Id: I45ca4998e50f60849f6f44544f3c8d22f33ac91c
diff --git a/t/real/agd.t b/t/real/agd.t
index 32f4008..f9b7ecc 100644
--- a/t/real/agd.t
+++ b/t/real/agd.t
@@ -6,6 +6,10 @@
use Log::Log4perl;
use utf8;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
diff --git a/t/real/bzk.t b/t/real/bzk.t
index f45200f..bb5a2f2 100644
--- a/t/real/bzk.t
+++ b/t/real/bzk.t
@@ -5,6 +5,10 @@
use JSON::XS;
use Log::Log4perl;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
diff --git a/t/real/bzk_2.t b/t/real/bzk_2.t
index 3e39924..d957b6b 100644
--- a/t/real/bzk_2.t
+++ b/t/real/bzk_2.t
@@ -4,6 +4,10 @@
use Data::Dumper;
use JSON::XS;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
diff --git a/t/real/drukola.t b/t/real/drukola.t
index 9a92444..7f7b6ab 100644
--- a/t/real/drukola.t
+++ b/t/real/drukola.t
@@ -4,6 +4,10 @@
use Data::Dumper;
use JSON::XS;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
diff --git a/t/real/goethe-2.t b/t/real/goethe-2.t
index 691889d..4cc0ede 100644
--- a/t/real/goethe-2.t
+++ b/t/real/goethe-2.t
@@ -4,6 +4,10 @@
use Data::Dumper;
use JSON::XS;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
diff --git a/t/real/goethe-tagged.t b/t/real/goethe-tagged.t
index 13d9365..4a547bf 100644
--- a/t/real/goethe-tagged.t
+++ b/t/real/goethe-tagged.t
@@ -4,6 +4,10 @@
use Data::Dumper;
use JSON::XS;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
diff --git a/t/real/goethe.t b/t/real/goethe.t
index 03af7cc..25a71c8 100644
--- a/t/real/goethe.t
+++ b/t/real/goethe.t
@@ -4,6 +4,10 @@
use Data::Dumper;
use JSON::XS;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
diff --git a/t/real/hnc.t b/t/real/hnc.t
index 5e44f6b..d7775d7 100644
--- a/t/real/hnc.t
+++ b/t/real/hnc.t
@@ -4,6 +4,10 @@
use Data::Dumper;
use JSON::XS;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
diff --git a/t/real/lwc.t b/t/real/lwc.t
index 1c104a5..0998711 100644
--- a/t/real/lwc.t
+++ b/t/real/lwc.t
@@ -4,6 +4,10 @@
use Data::Dumper;
use JSON::XS;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
diff --git a/t/real/ngafc.t b/t/real/ngafc.t
index 90f7392..346332a 100644
--- a/t/real/ngafc.t
+++ b/t/real/ngafc.t
@@ -15,6 +15,10 @@
use JSON::XS;
use Log::Log4perl;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
diff --git a/t/real/rei.t b/t/real/rei.t
index e08516d..3b75f4c 100644
--- a/t/real/rei.t
+++ b/t/real/rei.t
@@ -5,6 +5,10 @@
use JSON::XS;
use Log::Log4perl;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use utf8;
use lib 'lib', '../lib';
diff --git a/t/real/rwk.t b/t/real/rwk.t
index c0401c1..be96f25 100644
--- a/t/real/rwk.t
+++ b/t/real/rwk.t
@@ -5,6 +5,10 @@
use JSON::XS;
use Log::Log4perl;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use utf8;
use lib 'lib', '../lib';
diff --git a/t/real/wdd.t b/t/real/wdd.t
index 2b44500..c8c50b4 100644
--- a/t/real/wdd.t
+++ b/t/real/wdd.t
@@ -4,6 +4,10 @@
use Data::Dumper;
use JSON::XS;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
diff --git a/t/real/wpd.t b/t/real/wpd.t
index e45db0a..9bb0661 100644
--- a/t/real/wpd.t
+++ b/t/real/wpd.t
@@ -4,6 +4,10 @@
use Data::Dumper;
use JSON::XS;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
diff --git a/t/real/wpe.t b/t/real/wpe.t
index 962b361..9928344 100644
--- a/t/real/wpe.t
+++ b/t/real/wpe.t
@@ -4,6 +4,10 @@
use Data::Dumper;
use JSON::XS;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
diff --git a/t/real/wpf.t b/t/real/wpf.t
index ba6fb94..c3bec5a 100644
--- a/t/real/wpf.t
+++ b/t/real/wpf.t
@@ -4,6 +4,10 @@
use Data::Dumper;
use JSON::XS;
+if ($ENV{SKIP_REAL}) {
+ plan skip_all => 'Skip real tests';
+};
+
use Benchmark qw/:hireswallclock/;
my $t = Benchmark->new;
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');