~ubuntu-branches/ubuntu/breezy/ace/breezy

« back to all changes in this revision

Viewing changes to TAO/tests/AMH_Oneway/run_test.pl

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad, Benjamin Montgomery, Adam Conrad
  • Date: 2005-09-18 22:51:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge) (0.1.2 woody)
  • Revision ID: james.westby@ubuntu.com-20050918225138-seav22q6fyylb536
Tags: 5.4.7-3ubuntu1
[ Benjamin Montgomery ]
* Added a patch for amd64 and powerpc that disables the compiler
  option -fvisibility-inlines-hidden

[ Adam Conrad ]
* Added DPATCH_OPTION_CPP=1 to debian/patches/00options to make
  Benjamin's above changes work correctly with dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2
 
    & eval 'exec perl -S $0 $argv:q'
3
 
    if 0;
4
 
 
5
 
# run_test.pl,v 1.1 2003/02/07 01:08:47 mayur Exp
6
 
# -*- perl -*-
7
 
 
8
 
# This is a Perl script that tests AMH exceptions
9
 
 
10
 
use lib "../../../bin";
11
 
use PerlACE::Run_Test;
12
 
 
13
 
# Amount of delay (in seconds) between starting a server and a client.
14
 
$sleeptime = 6;
15
 
 
16
 
# File used to pass AMH server ior to its clients.
17
 
# This file name is hard-coded in the server.cpp and client.cpp files
18
 
$iorfile = PerlACE::LocalFile("test.ior");
19
 
 
20
 
unlink $iorfile;
21
 
 
22
 
$AMH = new PerlACE::Process ("server", "");
23
 
$CL = new PerlACE::Process ("client", "");
24
 
 
25
 
# Run the AMH server.
26
 
$AMH->Spawn ();
27
 
 
28
 
if (PerlACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
29
 
    print STDERR "ERROR: File containing AMH Server ior,".
30
 
        " <$iorfile>, cannot be found\n";
31
 
    $AMH->Kill ();
32
 
    exit 1;
33
 
}
34
 
 
35
 
# Run the cleint client.
36
 
$client = $CL->Spawn ();
37
 
 
38
 
 
39
 
# Clean up.
40
 
 
41
 
$client = $CL->WaitKill (30);
42
 
if ($client != 0) {
43
 
    print STDERR "ERROR: Client returned $amhserver\n";
44
 
    $status = 1;
45
 
}
46
 
 
47
 
 
48
 
$amhserver= $AMH->WaitKill (60);
49
 
if ($amhserver != 0) {
50
 
    print STDERR "ERROR: AMH Server returned $amhserver\n";
51
 
    $status = 1;
52
 
}
53
 
 
54
 
unlink $iorfile;
55
 
 
56
 
exit $status;