-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathmoxi_all.pl
executable file
·42 lines (31 loc) · 923 Bytes
/
moxi_all.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/perl
# Run this main test driver program from the project's
# top directory, which has t as a subdirectory.
#
my $exe = "./moxi";
use Carp qw(croak);
croak("moxi binary doesn't exist. Haven't run 'make' ?\n") unless -e $exe;
croak("moxi binary not executable\n") unless -x _;
sub go {
my ($topology, $protocol) = @_;
print "------------------------------------\n";
print "testing $topology $protocol\n";
my $result = system("./t/moxi.pl $topology $protocol");
if ($result != 0) {
print("fail moxi.pl $topology $protocol test\n");
exit $result;
}
}
# Ascii protocol compatibility tests.
#
go('simple', 'ascii');
go('chain', 'ascii');
go('fanout', 'ascii');
go('fanoutin', 'ascii');
# Binary protocol compatibility tests.
#
go('simple', 'binary');
go('fanout', 'binary');
print "------------------------------------\n";
my $res = system("./t/moxi_mock.pl ascii");
exit $res;