Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / examples / Advanced / run_test.pl
blob7fa76ae72324fbc9fdae75c8754d25ed3f513aaa
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 require ACEutils;
9 require Process;
11 $status = 0;
14 sub run_test_from_current_directory{
15 announce_test();
16 $test = Process::Create($EXEPREFIX."run_test.pl","");
17 wait_for_test_to_finish();
20 sub announce_test{
21 use Cwd;
22 $dir = cwd();
23 print STDOUT "__________________________________________________________ \n";
24 print STDOUT "**running test in $dir : \n";
27 sub wait_for_test_to_finish {
28 if ($test->TimedWait (60) == -1) {
29 print STDERR "ERROR: run_test.pl timedout\n";
30 $status = 1;
31 $test->Kill (); $test->TimedWait (1);
38 # change to each example's directory, and run their test
39 chdir "ch_3" or die "can't cd to ch_3 $!\n";
40 run_test_from_current_directory();
42 chdir "../ch_8_and_10" or die "can't cd to ch_8_and_10 $!\n";
43 run_test_from_current_directory();
45 chdir "../ch_12" or die "can't cd to ch_12 $!\n";
46 run_test_from_current_directory();
48 chdir "../ch_18" or die "can't cd to ch_18 $!\n";
49 run_test_from_current_directory();
51 #chdir "../ch_19" or die "can't cd to ch_19 $!\n";
52 #run_test_from_current_directory();
54 #chdir "../ch_21" or die "can't cd to ch_21 $!\n";
55 #run_test_from_current_directory();
57 exit $status;