From: David Schweikert Date: Fri, 28 Feb 2014 22:36:44 +0000 (+0100) Subject: travis tuning X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2ac03c210883ec6826ab145b29a6b3efeabfadc;p=fping.git travis tuning --- diff --git a/.travis.yml b/.travis.yml index 62bac5e..17855d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 index 0000000..74c1966 --- /dev/null +++ b/ci/test-1.pl @@ -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 index 28b9b11..0000000 --- a/ci/test-1.sh +++ /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