summaryrefslogtreecommitdiff
path: root/TAO/tests/Sequence_Iterators/run_test.pl
blob: 7bfb5ce867a5eefe73a599c9cfd2534daa384df1 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
     & eval 'exec perl -S $0 $argv:q'
     if 0;

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

use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::Run_Test;
use strict;

if ($ARGV[0] =~ /^-h/i || $ARGV[0] =~ /^-\?/i) {
  print "Usage: run_test.pl [-boost|-noboost]\n".
      "\tDefault is to run all tests, specifying -boost or -noboost will\n".
      "\teither run the tests that require the boost unit test library or\n".
      "\tthe other tests, respectively.\n";
  exit 0;
}

my $final_result = 0;

my @tests = qw(
#               unbounded_value_sequence_ut
#               unbounded_array_sequence_ut
#               bounded_value_sequence_ut
#               string_sequence_element_ut
#               unbounded_string_sequence_ut
#               bounded_string_sequence_ut
#               testing_allocation_traits_ut
#               unbounded_octet_sequence_ut
#               unbounded_octet_sequence_no_copy_ut
#               object_reference_sequence_element_ut
#               unbounded_object_reference_sequence_ut
#               unbounded_fwd_object_reference_sequence_ut
#               bounded_object_reference_sequence_ut
#               bounded_sequence_cdr_ut
#               unbounded_sequence_cdr_ut
              );

my @testsNoBoost = qw(
#               Unbounded_Octet
#               Unbounded_Simple_Types
#               Bounded_Simple_Types
                StringSeq
                Bounded_String
              );

my @testsToRun = qw();
  
push(@testsToRun, @tests) if ($#ARGV < 0 || $ARGV[0] eq '-boost');
push(@testsToRun, @testsNoBoost) if ($#ARGV < 0 || $ARGV[0] eq '-noboost');


foreach my $process (@testsToRun) {



  my $P = 0;
  if (PerlACE::is_vxworks_test()) {
      $P = new PerlACE::ProcessVX ($process,
                                  '--log_level=nothing '
                                  .'--report_level=no');
  }
  else {
      $P = new PerlACE::Process ($process,
                                '--log_level=nothing '
                                .'--report_level=no');
  }
  my $executable = $P->Executable;

  # Not all the binaries are generated in all configurations.
  if (PerlACE::is_vxworks_test()) {
    next unless -e $executable;
  }
  else {
    next unless -x $executable;
  }

  print "Running $process ...";
  my $result = $P->Spawn;
  if ($result != 0) {
    print "FAILED\n";
    $final_result = 1;
    next;
  }
  $result = $P->WaitKill($PerlACE::wait_interval_for_process_creation);
  if ($result != 0) {
    print "FAILED\n";
    $final_result = 1;
    next;
  }
  print "SUCCESS\n";
}

exit $final_result;