diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-13 20:23:09 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-13 20:23:09 +0000 |
commit | 2b6a0e983f0b4b21ec5e8bbbb4bfeae202a819ef (patch) | |
tree | a902c2e52d1c2cb0189448c9ead3a2eb2bcac352 /bin | |
parent | 33f4077ffbab28b19b7db53626033a4e7435cccd (diff) | |
download | ATCD-2b6a0e983f0b4b21ec5e8bbbb4bfeae202a819ef.tar.gz |
Fixed output direction problem.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/run_all_win32.pl | 61 |
1 files changed, 40 insertions, 21 deletions
diff --git a/bin/run_all_win32.pl b/bin/run_all_win32.pl index 1c17ec478ec..01fa7f8532b 100755 --- a/bin/run_all_win32.pl +++ b/bin/run_all_win32.pl @@ -15,18 +15,34 @@ use File::Basename; use FileHandle; require POSIX; + # This is the module we will checkout, someday someone could define a # smaller module. $MODULE='ACE_wrappers'; +# The following are for redirecting execution results to temporary files. +$exe_log_name='run_test.log'; # Name of the tempfile used. + +# If using 'sh'. +$sh_cmd="c:/bin/sh "; +$sh_redirection=" > $exe_log_name 2>&1"; + +#if using '4nt' +$four_nt_cmd="d:/Utils/4NT301/4NT.EXE "; +$four_nt_redirection=" >& $exe_log_name"; + +# Pick the one your like. +$shell_invoke = $sh_cmd; +$redirect_output = $sh_redirection; + # This are the pairs "sub-directory , script" we run; the separator # *must* be a space followed by a comma and then another space. -@RUN_LIST = - ( 'tests , run_tests.bat', - 'TAO/tests/Param_Test , run_test.pl', - 'TAO/tests/Param_Test , run_test.pl -i dii', - 'TAO/performance-tests/Cubit/TAO/IDL_Cubit , run_test.pl', +@RUN_LIST = ( + 'tests , run_tests.bat', + 'TAO/tests/Param_Test , run_test.pl', + 'TAO/tests/Param_Test , run_test.pl -i dii', + 'TAO/performance-tests/Cubit/TAO/IDL_Cubit , run_test.pl', 'TAO/tests/OctetSeq , run_test.pl', 'TAO/tests/Multiple_Inheritance , run_test.pl', 'TAO/tests/MT_Client , run_test.pl', @@ -37,16 +53,16 @@ $MODULE='ACE_wrappers'; 'TAO/tests/POA/Identity , run_test.pl', 'TAO/tests/POA/Destruction , run_test.pl', 'TAO/tests/IORManipulation , run_test.pl', - 'TAO/examples/POA/Adapter_Activator , run_test.pl', - 'TAO/examples/POA/DSI , run_test.pl', - 'TAO/examples/POA/Default_Servant , run_test.pl', - 'TAO/examples/POA/Explicit_Activation , run_test.pl', - 'TAO/examples/POA/FindPOA , run_test.pl', - 'TAO/examples/POA/Forwarding , run_test.pl', - 'TAO/examples/POA/NewPOA , run_test.pl', - 'TAO/examples/POA/On_Demand_Activation , run_test.pl', - 'TAO/examples/POA/On_Demand_Loading , run_test.pl', - 'TAO/examples/POA/Reference_Counted_Servant , run_test.pl', + 'TAO/examples/POA/Adapter_Activator , run_test.pl', + 'TAO/examples/POA/DSI , run_test.pl', + 'TAO/examples/POA/Default_Servant , run_test.pl', + 'TAO/examples/POA/Explicit_Activation , run_test.pl', + 'TAO/examples/POA/FindPOA , run_test.pl', + 'TAO/examples/POA/Forwarding , run_test.pl', + 'TAO/examples/POA/NewPOA , run_test.pl', + 'TAO/examples/POA/On_Demand_Activation , run_test.pl', + 'TAO/examples/POA/On_Demand_Loading , run_test.pl', + 'TAO/examples/POA/Reference_Counted_Servant , run_test.pl', 'TAO/examples/Simple/bank , run_test.pl', 'TAO/examples/Simple/grid , run_test.pl', 'TAO/examples/Simple/time-date , run_test.pl', @@ -64,7 +80,7 @@ $MODULE='ACE_wrappers'; 'TAO/examples/Simple/echo , run_test.pl < Echo.idl', # 'TAO/examples/Simple/chat , run_test.pl', 'TAO/orbsvcs/tests/Property , run_test.pl', - 'TAO/performance-tests/POA/Object_Creation_And_Registration , run_test.pl', + 'TAO/performance-tests/POA/Object_Creation_And_Registration , run_test.pl', 'TAO/performance-tests/Cubit/TAO/MT_Cubit , run_test.pl -n 100' # 'TAO/orbsvcs/tests/ImplRepo , run_test.pl airplane', # 'TAO/orbsvcs/tests/ImplRepo , run_test.pl airplane_ir', @@ -171,10 +187,11 @@ foreach $i (@RUN_LIST) { || mydie "cannot chdir to $subdir"; $run_error = 0; - if (open(RUN, "$program |") == 0) { - push @failures, "cannot run $program in $directory"; - next; - } + + system ($shell_invoke . " " . $program . " " . $redirect_output); + + open (RUN, "$exe_log_name") || push @failures, "Can't open execution log file $exe_log_name\n"; + while (<RUN>) { print LOG $_; if (m/^Error/ || m/FAILED/ || m/EXCEPTION/) { @@ -182,7 +199,7 @@ foreach $i (@RUN_LIST) { } } if (close(RUN) == 0) { - push @failures, "Error when closing pipe for $program in $directory"; + push @failures, "Error when closing log file $program in $directory"; next; } $date = localtime; @@ -192,6 +209,8 @@ foreach $i (@RUN_LIST) { push @failures, "errors detected while running $program in $directory"; } + + unlink ("$exe_log_name"); } if ($#failures >= 0) { |