blob: 09e002da4f369d82e4c7a3ec2759ee2209e398ee (
plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
& eval 'exec perl -S $0 $argv:q'
if 0;
# $Id$
# -*- perl -*-
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::Run_Test;
$persistent = "-p";
$status = 0;
$iorfile = "if_repo.ior";
$backing_file = PerlACE::LocalFile ("ifr_default_backing_store");
$init_ref = "-ORBInitRef InterfaceRepository=file://$iorfile";
$debug = "";
$query_opt = "-q";
$other = "";
for ($i = 0; $i <= $#ARGV; $i++) {
if ($ARGV[$i] eq "-d") {
$debug = "-d";
}
else {
$other .= $ARGV[$i];
}
}
unlink $iorfile;
unlink $backing_file;
$IFR = new PerlACE::Process ("../../../IFR_Service/IFR_Service", " -o $iorfile" . " $persistent");
$T = new PerlACE::Process ("Persistence_Test");
$IFR->Spawn ();
if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
$IFR->Kill ();
exit 1;
}
$T->Arguments ($init_ref);
$test = $T->SpawnWaitKill (60);
if ($test != 0) {
print STDERR "ERROR: populate test returned $test\n";
$status = 1;
}
$server = $IFR->TerminateWaitKill (5);
if ($server != 0) {
print STDERR "ERROR: IFR returned $server\n";
$status = 1;
}
unlink $iorfile;
$IFR->Spawn ();
if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
$IFR->Kill ();
exit 1;
}
$T->Arguments ("$init_ref $debug $query_opt");
$test = $T->SpawnWaitKill (60);
if ($test != 0) {
print STDERR "ERROR: query test returned $test\n";
$status = 1;
}
$server = $IFR->TerminateWaitKill (5);
if ($server != 0) {
print STDERR "ERROR: IFR returned $server\n";
$status = 1;
}
unlink $iorfile;
unlink $backing_file;
exit $status;
|