From 389747e90e9f5f1dde79f7cbf556517f2d935dac Mon Sep 17 00:00:00 2001 From: tonnesen Date: Tue, 29 Oct 2002 20:05:44 +0000 Subject: [PATCH] Added check for environment variable 'nonproductioneserver' before running these tests. --- t/webscripts/catalog.t | 10 +++++++++- t/webscripts/circulation.t | 8 +++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/t/webscripts/catalog.t b/t/webscripts/catalog.t index 4682209fd2..cc905d88d6 100644 --- a/t/webscripts/catalog.t +++ b/t/webscripts/catalog.t @@ -1,4 +1,10 @@ -BEGIN { $| = 1; print "1..28\n"; +BEGIN { + unless ($ENV{'nonproductionserver'}) { + print "1..0 # Skipped: environment variable 'nonproductionserver' not set\n"; + exit; + } + + $| = 1; print "1..28\n"; $::intranetdir=`grep intranetdir /etc/koha.conf`; chomp $::intranetdir; $::intranetdir=~s/\s*intranetdir\s*=\s*//i; @@ -6,6 +12,8 @@ BEGIN { $| = 1; print "1..28\n"; END {print "not ok 1 test script load\n" unless $loaded;} + + use lib $::intranetdir."/modules"; $ENV{PERLLIB}=$::intranetdir."/modules"; diff --git a/t/webscripts/circulation.t b/t/webscripts/circulation.t index 801e462337..d3c5bfb162 100644 --- a/t/webscripts/circulation.t +++ b/t/webscripts/circulation.t @@ -1,4 +1,10 @@ -BEGIN { $| = 1; print "1..10\n"; +BEGIN { + unless ($ENV{'nonproductionserver'}) { + print "1..0 # Skipped: environment variable 'nonproductionserver' not set\n"; + exit; + } + + $| = 1; print "1..10\n"; $::intranetdir=`grep intranetdir /etc/koha.conf`; chomp $::intranetdir; $::intranetdir=~s/\s*intranetdir\s*=\s*//i; -- 2.39.5