2005-01-20 23:58:29 +00:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
print("\n\nRunning Cluster Hash Table self test.\n");
|
|
|
|
print("-------------------------------------\n");
|
|
|
|
|
|
|
|
mkdir 'coord';
|
|
|
|
mkdir 'sub0';
|
|
|
|
mkdir 'sub1';
|
|
|
|
mkdir 'sub2';
|
|
|
|
mkdir 'sub3';
|
|
|
|
|
|
|
|
chdir 'coord';
|
|
|
|
system ("rm *.txt");
|
2005-01-31 01:29:52 +00:00
|
|
|
#system ("../coordinator ../cluster.conf > /dev/null &");
|
|
|
|
system ("../coordinator ../cluster.conf 2>&1 | ../prepend coordinator &");
|
2005-01-20 23:58:29 +00:00
|
|
|
chdir '..';
|
|
|
|
chdir 'sub0';
|
|
|
|
system ("rm *.txt");
|
2005-01-31 01:29:52 +00:00
|
|
|
#system ("../subordinate 0 ../cluster.conf > /dev/null &");
|
|
|
|
system ("../subordinate 0 ../cluster.conf 2>&1 | ../prepend 'subordinate 0' &");
|
2005-01-20 23:58:29 +00:00
|
|
|
chdir '..';
|
|
|
|
chdir 'sub1';
|
|
|
|
system ("rm *.txt");
|
2005-01-31 01:29:52 +00:00
|
|
|
#system ("../subordinate 1 ../cluster.conf > /dev/null &");
|
|
|
|
system ("../subordinate 1 ../cluster.conf 2>&1 | ../prepend 'subordinate 1' &");
|
2005-01-20 23:58:29 +00:00
|
|
|
chdir '..';
|
|
|
|
chdir 'sub2';
|
|
|
|
system ("rm *.txt");
|
2005-01-31 01:29:52 +00:00
|
|
|
#system ("../subordinate 2 ../cluster.conf > /dev/null &");
|
|
|
|
system ("../subordinate 2 ../cluster.conf 2>&1 | ../prepend 'subordinate 2' &");
|
2005-01-20 23:58:29 +00:00
|
|
|
chdir '..';
|
|
|
|
chdir 'sub3';
|
|
|
|
system ("rm *.txt");
|
2005-01-31 01:29:52 +00:00
|
|
|
#system ("../subordinate 3 ../cluster.conf > /dev/null &");
|
|
|
|
system ("../subordinate 3 ../cluster.conf 2>&1 | ../prepend 'subordinate 3' &");
|
2005-01-20 23:58:29 +00:00
|
|
|
chdir '..';
|
|
|
|
|
|
|
|
system ("rm *.txt");
|
2005-01-31 01:29:52 +00:00
|
|
|
my $ret = system ("./client 2>&1 | ./prepend client");
|
2005-01-20 23:58:29 +00:00
|
|
|
|
|
|
|
`killall coordinator`;
|
|
|
|
`killall subordinate`;
|
|
|
|
|
|
|
|
exit $ret;
|