summaryrefslogtreecommitdiff
path: root/tests/autotest-remote-host.pl
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-13 15:51:42 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-13 15:51:42 +0000
commit754567ece20faa10d6d4de6d8f5c421b51dd259c (patch)
tree4e21ce4702fe942c7c45277753834893858866e8 /tests/autotest-remote-host.pl
parent1b5fa404db5c67454e9bf4fcf5b81cf924456374 (diff)
tests: Added remote autotest host/server scripts
git-svn-id: http://pugixml.googlecode.com/svn/trunk@422 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/autotest-remote-host.pl')
-rw-r--r--tests/autotest-remote-host.pl25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/autotest-remote-host.pl b/tests/autotest-remote-host.pl
new file mode 100644
index 0000000..91d929a
--- /dev/null
+++ b/tests/autotest-remote-host.pl
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+
+sub execprint
+{
+ my $cmd = shift;
+
+ open PIPE, "$cmd |" || die "$cmd failed: $!\n";
+ print while (<PIPE>);
+ close PIPE;
+
+ return $?;
+}
+
+use IO::Socket;
+
+$exitcmd = shift;
+
+my $client = new IO::Socket::INET(PeerAddr => "10.0.2.2:7183", Timeout => 5);
+exit unless $client;
+
+select $client;
+
+&execprint('svn up') == 0 || die "error updating from repo\n";
+&execprint('perl tests/autotest-local.pl') == 0 || die "error launching tests\n";
+system($exitcmd);