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

« back to all changes in this revision

Viewing changes to TAO/orbsvcs/tests/Notify/Basic/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.7 2003/06/24 22:40:49 pradeep Exp
6
 
# -*- perl -*-
7
 
 
8
 
use lib "../../../../../bin";
9
 
use PerlACE::Run_Test;
10
 
 
11
 
$experiment_timeout = 60;
12
 
$startup_timeout = 60;
13
 
$notifyior = PerlACE::LocalFile ("notify.ior");
14
 
$namingior = PerlACE::LocalFile ("naming.ior");
15
 
$status = 0;
16
 
 
17
 
@tests =
18
 
  (
19
 
   {
20
 
    name => "AdminProperties",
21
 
    args => "-ORBSvcConf adminproperties.conf",
22
 
   },
23
 
   {
24
 
    name => "ConnectDisconnect",
25
 
    args => "",
26
 
   },
27
 
   {
28
 
    name => "Events",
29
 
    args => "",
30
 
   },
31
 
   {
32
 
    name => "IdAssignment",
33
 
    args => "",
34
 
   },
35
 
   {
36
 
    name => "LifeCycle",
37
 
    args => "",
38
 
   },
39
 
   {
40
 
    name => "Simple",
41
 
    args => "",
42
 
   },
43
 
   {
44
 
    name => "MultiTypes",
45
 
    args => "",
46
 
   },
47
 
   {
48
 
    name => "Filter",
49
 
    args => "",
50
 
   },
51
 
   {
52
 
    name => "Updates",
53
 
    args => "",
54
 
   },
55
 
   {
56
 
    name => "Sequence",
57
 
    args => "",
58
 
   },
59
 
  );
60
 
 
61
 
@default_test_configs =
62
 
  (
63
 
   "notify.rt.conf",
64
 
   "notify.reactive.conf",
65
 
   "notify.mt.conf",
66
 
   );
67
 
 
68
 
if ($#ARGV == -1)
69
 
  {
70
 
    @test_configs = @default_test_configs;
71
 
  }
72
 
else
73
 
  {
74
 
    @test_configs = @ARGV;
75
 
  }
76
 
 
77
 
$Naming = new PerlACE::Process ("../../../Naming_Service/Naming_Service",
78
 
                                "-o $namingior");
79
 
unlink $namingior;
80
 
 
81
 
$Naming->Spawn ();
82
 
 
83
 
if (PerlACE::waitforfile_timed ($namingior, $startup_timeout) == -1) {
84
 
  print STDERR "ERROR: waiting for the naming service to start\n";
85
 
  $Naming->Kill ();
86
 
  exit 1;
87
 
}
88
 
 
89
 
for $config (@test_configs)
90
 
  {
91
 
    print STDERR "\nTesting Notification Service with config file = $config ....\n\n";
92
 
 
93
 
    $Notification = new PerlACE::Process ("../../../Notify_Service/Notify_Service",
94
 
                                          "-ORBInitRef NameService=file://$namingior " .
95
 
                                          "-IORoutput $notifyior " .
96
 
                                          "-ORBSvcConf $config");
97
 
    unlink $notifyior;
98
 
    $Notification->Spawn ();
99
 
    
100
 
    if (PerlACE::waitforfile_timed ($notifyior, $startup_timeout) == -1) {
101
 
      print STDERR "ERROR: waiting for the notify service to start\n";
102
 
      $Notification->Kill ();
103
 
      $Naming->Kill ();
104
 
      exit 1;
105
 
    }
106
 
    
107
 
    for $name (@tests)
108
 
      {
109
 
        ## The MaxQueueLength and MaxEventsPerConsumer are not supported in the Reactive
110
 
        ## configuration, so we skip this test for now.
111
 
        ## The Notification should actually throw an exception for the property not supported.
112
 
        if ($name->{name} eq "AdminProperties" 
113
 
            && ($config eq "notify.reactive.conf" || $config eq "notify.rt.conf"))
114
 
          {
115
 
            next;
116
 
          }
117
 
 
118
 
        print STDERR "\nTesting $name->{name}....\n\n";
119
 
        $test = new PerlACE::Process ("./$name->{name}",
120
 
                                      "-ORBInitRef NameService=file://$namingior " .
121
 
                                      "$name->{args} ");
122
 
        $test->Spawn ();
123
 
 
124
 
        $status = $test->WaitKill ($experiment_timeout);
125
 
 
126
 
        if ($status != 0) 
127
 
          {
128
 
            print STDERR "ERROR: $name returned $status\n";
129
 
            break;
130
 
          }
131
 
      }
132
 
    
133
 
    $Notification->Kill ();
134
 
  }
135
 
 
136
 
$Naming->Kill ();
137
 
 
138
 
unlink $namingior;
139
 
unlink $notifyior;
140
 
 
141
 
exit $status;