]> git.gsnw.org Git - fping.git/commitdiff
travis tuning
authorDavid Schweikert <david@schweikert.ch>
Fri, 28 Feb 2014 22:36:44 +0000 (23:36 +0100)
committerDavid Schweikert <david@schweikert.ch>
Fri, 28 Feb 2014 22:36:44 +0000 (23:36 +0100)
.travis.yml
ci/test-1.pl [new file with mode: 0755]
ci/test-1.sh [deleted file]

index 62bac5e398af54c697e51e5c529ce9b8f07d8736..17855d2587e1cc59107e9d951cada648c1ccd7f2 100644 (file)
@@ -6,9 +6,10 @@ compiler:
 branches:
   only:
       - master
-before_install:
+install:
     - sudo apt-get remove -qq autoconf automake autotools-dev libtool
     - ci/build-1-autotools.sh
+    - cpanm Test::Command
 script:
     - ci/build-2-install.sh
-    - ci/test-1.sh
+    - prove ci/test-*.pl
diff --git a/ci/test-1.pl b/ci/test-1.pl
new file mode 100755 (executable)
index 0000000..74c1966
--- /dev/null
@@ -0,0 +1,9 @@
+#!/usr/bin/perl -w
+
+use Test::Command tests => 3;
+my $fping_bin = '/opt/fping/sbin/fping';
+
+my $cmd1 = Test::Command->new(cmd => "sudo $fping_bin 127.0.0.1");
+$cmd1->exit_is_num(0);
+$cmd1->stdout_is_eq("127.0.0.1 is alive\n");
+$cmd1->stderr_is_eq("");
diff --git a/ci/test-1.sh b/ci/test-1.sh
deleted file mode 100755 (executable)
index 28b9b11..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-if [ ! -d ci ]; then
-    echo "you must run this in the root fping directory" >&2
-    exit 1
-fi
-
-
-sudo /opt/fping/sbin/fping 127.0.0.1