Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / tests / Notify / XML_Persistence / run_test.pl
blob790cc8d496a46bd5d51fbaed998b0aa3ac17a1e3
1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
3 if 0;
5 # -*- perl -*-
7 use lib "$ENV{ACE_ROOT}/bin";
8 use PerlACE::TestTarget;
9 use File::Compare;
11 $status = 0;
12 $debug_level = '0';
14 foreach $i (@ARGV) {
15 if ($i eq '-debug') {
16 $debug_level = '10';
20 my $test = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
22 my $pass = 3;
23 my $port = $test->RandomPort();
24 my $loadtest_xml = "loadtest.xml";
25 my $abc_xml = "abc.xml";
26 my $prefix = "abc";
28 $T = $test->CreateProcess ("main", "-ORBdebuglevel $debug_level -orbobjrefstyle url ".
29 "-ORBEndpoint iiop://:$port -pass $pass");
31 sub cleanup() {
32 $test->DeleteFile($loadtest_xml);
33 $test->DeleteFile($abc_xml);
35 for ($i = 0; $i < 10; ++$i) {
36 $test->DeleteFile($prefix.".00".$i);
38 for ($i = 10; $i < 20; ++$i) {
39 $test->DeleteFile($prefix.".0".$i);
43 cleanup();
45 $test_status = $T->SpawnWaitKill ($test->ProcessStartWaitInterval());
47 if ($test_status != 0) {
48 print STDERR "ERROR: test returned $test_status\n";
49 $status = 1;
52 $different = compare($loadtest_xml, $abc_xml);
53 if ($different) {
54 print "ERROR : $loadtest_xml != $abc_xml\n";
55 exit 1;
57 else {
58 print "Success : $loadtest_xml == $abc_xml\n";
61 exit $status;