diff options
Diffstat (limited to '3rdparty/openpgm-svn-r1085/pgm/test/spm.pl')
-rwxr-xr-x | 3rdparty/openpgm-svn-r1085/pgm/test/spm.pl | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/3rdparty/openpgm-svn-r1085/pgm/test/spm.pl b/3rdparty/openpgm-svn-r1085/pgm/test/spm.pl new file mode 100755 index 0000000..c92b8fc --- /dev/null +++ b/3rdparty/openpgm-svn-r1085/pgm/test/spm.pl @@ -0,0 +1,42 @@ +#!/usr/bin/perl +# spm.pl +# 5.1.4. Ambient SPMs + +use strict; +use PGM::Test; + +BEGIN { require "test.conf.pl"; } + +$| = 1; + +my $mon = PGM::Test->new(tag => 'mon', host => $config{mon}{host}, cmd => $config{mon}{cmd}); +my $app = PGM::Test->new(tag => 'app', host => $config{app}{host}, cmd => $config{app}{cmd}); + +$mon->connect; +$app->connect; + +sub close_ssh { + $mon = $app = undef; + print "finished.\n"; +} + +$SIG{'INT'} = sub { print "interrupt caught.\n"; close_ssh(); }; + +$mon->say ("filter $config{app}{ip}"); +print "mon: ready.\n"; + +$app->say ("create ao"); +$app->say ("bind ao"); +print "app: ready.\n"; + +print "mon: wait for spm ...\n"; +$mon->wait_for_spm; +print "mon: received spm.\n"; + +print "test completed successfully.\n"; + +$mon->disconnect (1); +$app->disconnect; +close_ssh; + +# eof |