summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Logger/run_test.pl
blob: bbacd0be9ee927cd67796c9a8625d2707272f541 (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
# $Id$
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
    & eval 'exec perl -S $0 $argv:q'
    if 0;

$tao_root = $ENV{TAO_ROOT};
# This is a Perl script that runs the Logger client and server

unshift @INC, '../../../../bin';
require Process;

# amount of delay between running the servers
$sleeptime = 3;

# Starts the Logging Service
sub service
{
  my $args = "";
  my $prog = $EXEPREFIX."$tao_root/orbsvcs/Logging_Service/Logging_Service"
      .$Process::EXE_EXT;    
  $SV = Process::Create ($prog, $args);
}

# Starts the test client
sub test
{
  my $args = "";
  my $prog = $EXEPREFIX."Logging_Test".$Process::EXE_EXT;
    
  system ("$prog $args");
}

# Start the service
service ();

# Give the service time to settle
sleep $sleeptime;

# Start the client (which exits automatically)
test ();

# Give the client time to log and exit
sleep 3;

# Kill the service
$SV->Kill ();