From 4a646e9de42686323dd80d157b4b2f25ea8351f9 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Fri, 19 Feb 2010 22:36:27 +0000 Subject: [PATCH] run tests on all hosts automatically git-svn-id: svn://svn.rot13.org/sysadmin-cookbook@163 191e9f34-6774-4a6d-acfc-7664dacd4a2a --- recepies/netpipe-tcp/test-all.pl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 recepies/netpipe-tcp/test-all.pl diff --git a/recepies/netpipe-tcp/test-all.pl b/recepies/netpipe-tcp/test-all.pl new file mode 100755 index 0000000..fb48270 --- /dev/null +++ b/recepies/netpipe-tcp/test-all.pl @@ -0,0 +1,26 @@ +#!/usr/bin/perl + +# usage: test-all.pl hosts + +use warnings; +use strict; +use autodie; +use File::Slurp; + +chdir '/srv/sysadmin-cookbook/recepies/netpipe-tcp/'; + +my @hosts = read_file 'hosts'; + +foreach my $host ( @hosts ) { + chomp($host); + + foreach my $to ( @hosts ) { + chomp($to); + warn "start NPtcp on $to\n"; + system "ssh $to NPtcp &"; + } + + warn "TEST from $host\n"; + system "ssh $host /srv/sysadmin-cookbook/recepies/netpipe-tcp/test.sh"; + system "rsync $host:/tmp/*.np $host/"; +} -- 2.20.1