Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tests / DynAny_Test / run_test.pl
blob64e2257e833b5edcaa4c115adb4ff95940027d00
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;
10 $status = 0;
11 $type = "";
13 my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
15 sub run_test
17 my $type = shift(@_);
19 $BT = $server->CreateProcess ("basic_test", "-t $type");
20 my $basictest = $BT->SpawnWaitKill ($server->ProcessStartWaitInterval());
22 if ($basictest != 0) {
23 print STDERR "ERROR: basic test for ($type) returned $basictest\n";
24 $status = 1;
28 for ($i = 0; $i <= $#ARGV; $i++) {
29 if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
30 print "Run_Test Perl script for TAO DynAny Test\n\n";
31 print "run_test [-t type]\n";
32 print "\n";
33 print "-t type -- runs only one type of dynany test\n";
34 exit;
36 elsif ($ARGV[$i] eq "-t") {
37 $type = $ARGV[$i + 1];
38 $i++;
42 @types = ("dynany", "dynarray", "dynenum", "dynsequence", "dynstruct",
43 "dynunion");
46 if ($type ne "") {
47 run_test ($type);
49 else {
50 foreach $type (@types) {
51 run_test ($type);
55 exit $status;