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

# $Id$
# -*- perl -*-

# 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 = 7;

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

# Starts the test client
sub test
{
  my $args = "";
  my $prog = $EXEPREFIX."Logging_Test".$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 ();