skip test if no zebra is running on localhost:8018
authorWolfram Schneider <wosch@indexdata.dk>
Wed, 14 Aug 2013 11:07:08 +0000 (13:07 +0200)
committerWolfram Schneider <wosch@indexdata.dk>
Wed, 14 Aug 2013 11:07:08 +0000 (13:07 +0200)
We need this for jenkins regression tests

t/ZOOM-IRSpy.t

index 7d05d2d..6d84abc 100644 (file)
@@ -1,12 +1,19 @@
 # change 'tests => 1' to 'tests => last_test_to_print';
 
 # change 'tests => 1' to 'tests => last_test_to_print';
 
-use Test::More tests => 3;
-
 BEGIN {
 BEGIN {
-    use lib './lib';
-    use_ok('ZOOM::IRSpy');
+    system( "zoomsh", "-e", "open localhost:8018", "quit" );
+    if ($?) {
+        print "1..0 # skip no zebra running on localhost:8018\n";
+        exit;
+    }
 }
 
 }
 
+use Test::More
+use lib './lib';
+use_ok('ZOOM::IRSpy');
+
+plan tests => 3;
+
 # Insert your test code below, the Test::More module is use()ed here so read
 # its man page ( perldoc Test::More ) for help writing this test script.
 
 # Insert your test code below, the Test::More module is use()ed here so read
 # its man page ( perldoc Test::More ) for help writing this test script.