]> git.gsnw.org Git - fping.git/commitdiff
add coveralls.io
authorDavid Schweikert <david@schweikert.ch>
Tue, 4 Mar 2014 21:51:00 +0000 (22:51 +0100)
committerDavid Schweikert <david@schweikert.ch>
Tue, 4 Mar 2014 21:51:00 +0000 (22:51 +0100)
.coveralls.yml [new file with mode: 0644]
.gitignore
.travis.yml
ci/build-2-install.sh
ci/test-1.pl

diff --git a/.coveralls.yml b/.coveralls.yml
new file mode 100644 (file)
index 0000000..9160059
--- /dev/null
@@ -0,0 +1 @@
+service_name: travis-ci
index d30d12679b0160c2b229de7d62b22ffe700ffc17..b324b701859098e7a9a7137a449b5b05acca5952 100644 (file)
@@ -1,6 +1,7 @@
 .*.swp
 *.tar.gz
 *~
+src/*.gcno
 .deps
 Makefile
 Makefile.in
index 3b987eb239215d15f2ffb891f368e9792e54fc39..5da68fc459a6c313ac5c94c34d72ceace1422b7a 100644 (file)
@@ -5,10 +5,11 @@ env:
         - secure: "CoI8hwHH1yfQoQxIfWGRS0WfTyScox+5aJn0fDDgz2uKrrIxmBvIw/WKX8wcSiV6fLmLuwgNkKqSM3hdO4qaG+JxfWcuEiZZHm+kxSGMkWbGb/fvAI+gHg8ldKyYttcIX71O5rlZiC2QpNKQi2v18S6pI5p8eqnx7DYx4YrmguQ="
 compiler:
     - gcc
-    - clang
 branches:
     only:
         - master
+before_install:
+    - sudo pip install cpp-coveralls --use-mirrors
 install:
     - ci/build-1-autotools.sh
     - curl -L http://cpanmin.us | perl - --sudo App::cpanminus
@@ -19,3 +20,4 @@ script:
     - ci/test-tarball.sh
 after_success:
     - ci/deploy-bintray.sh
+    - coveralls
index bdf2cdef457d5d4379a89a30243ab3ce8946f38b..d8f3b1625284c07b6018cb61addb6b6945feebcc 100755 (executable)
@@ -9,5 +9,6 @@ fi
 
 autoreconf -i
 ./configure --enable-ipv4 --enable-ipv6 --prefix=/opt/fping
-make 
+make CFLAGS="-g -fprofile-arcs -ftest-coverage"
 sudo make install
+sudo setcap cap_net_raw+ep /opt/fping/sbin/fping
index 2e24329614d6ec84b906881660545cd63b90347d..0b88863e5009971ef546c68535bbaf3a00fad003 100755 (executable)
@@ -7,19 +7,19 @@ my $fping6_bin = '/opt/fping/sbin/fping6';
 #my $fping6_bin = '/home/dws/checkouts/fping/src/fping6';
 
 # ping 127.0.0.1
-my $cmd1 = Test::Command->new(cmd => "sudo $fping_bin 127.0.0.1");
+my $cmd1 = Test::Command->new(cmd => "$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("");
 
 # ping ::1
-my $cmd2 = Test::Command->new(cmd => "sudo $fping6_bin ::1");
+my $cmd2 = Test::Command->new(cmd => "$fping6_bin ::1");
 $cmd2->exit_is_num(0);
 $cmd2->stdout_is_eq("::1 is alive\n");
 $cmd2->stderr_is_eq("");
 
 # ping 3 times 127.0.0.1
-my $cmd3 = Test::Command->new(cmd => "sudo $fping_bin -p 100 -C3 127.0.0.1");
+my $cmd3 = Test::Command->new(cmd => "$fping_bin -p 100 -C3 127.0.0.1");
 $cmd3->exit_is_num(0);
 $cmd3->stdout_like(qr{127\.0\.0\.1 : \[0\], 84 bytes, 0\.\d+ ms \(0\.\d+ avg, 0% loss\)
 127\.0\.0\.1 : \[1\], 84 bytes, 0\.\d+ ms \(0.\d+ avg, 0% loss\)