summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-06-13 01:19:43 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-06-13 01:19:43 +0000
commite58bf0f642defb1ac6ee8e2938ba4608fa057e2e (patch)
tree96ad161bfdd422f396a2da38e8f06e64abb9a3cd
parentf94fbdae1362b6f6a79ac55b72a5eaa17b99f977 (diff)
downloadATCD-e58bf0f642defb1ac6ee8e2938ba4608fa057e2e.tar.gz
ChangeLogTag:Mon Jun 12 18:17:42 2000 Darrell Brunsch <brunsch@cs.wustl.edu>
-rw-r--r--ChangeLog9
-rw-r--r--ChangeLogs/ChangeLog-02a9
-rw-r--r--ChangeLogs/ChangeLog-03a9
-rw-r--r--bin/auto_run_tests.lst81
-rwxr-xr-xbin/auto_run_tests.pl114
-rw-r--r--tests/run_test.lst89
-rwxr-xr-xtests/run_test.pl210
7 files changed, 521 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5d4bafec8d6..501f31f78df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Mon Jun 12 18:17:42 2000 Darrell Brunsch <brunsch@cs.wustl.edu>
+
+ * bin/auto_run_tests.lst: (added)
+ * bin/auto_run_tests.pl: (added)
+ * tests/run_test.lst: (added)
+ * tests/run_test.pl: (added)
+
+ New scripts to facilitate the auto_build testing on NT.
+
Sun Jun 11 18:12:12 2000 Vishal Kachroo <vishal@cs.wustl.edu>
* examples/QOS/QoSEvent.h: Removed a warning on Win2K.
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 5d4bafec8d6..501f31f78df 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,12 @@
+Mon Jun 12 18:17:42 2000 Darrell Brunsch <brunsch@cs.wustl.edu>
+
+ * bin/auto_run_tests.lst: (added)
+ * bin/auto_run_tests.pl: (added)
+ * tests/run_test.lst: (added)
+ * tests/run_test.pl: (added)
+
+ New scripts to facilitate the auto_build testing on NT.
+
Sun Jun 11 18:12:12 2000 Vishal Kachroo <vishal@cs.wustl.edu>
* examples/QOS/QoSEvent.h: Removed a warning on Win2K.
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 5d4bafec8d6..501f31f78df 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,12 @@
+Mon Jun 12 18:17:42 2000 Darrell Brunsch <brunsch@cs.wustl.edu>
+
+ * bin/auto_run_tests.lst: (added)
+ * bin/auto_run_tests.pl: (added)
+ * tests/run_test.lst: (added)
+ * tests/run_test.pl: (added)
+
+ New scripts to facilitate the auto_build testing on NT.
+
Sun Jun 11 18:12:12 2000 Vishal Kachroo <vishal@cs.wustl.edu>
* examples/QOS/QoSEvent.h: Removed a warning on Win2K.
diff --git a/bin/auto_run_tests.lst b/bin/auto_run_tests.lst
new file mode 100644
index 00000000000..19ccdb51989
--- /dev/null
+++ b/bin/auto_run_tests.lst
@@ -0,0 +1,81 @@
+# This is the list of run_test.pl's that need to be run by
+# auto_run_tests.pl.
+# Each line has its own test, and a test can be followed by a
+# list of configurations it does _not_ run on.
+#
+# Example: TAO\examples\foo\run_test.pl: MINIMUM ST
+
+tests/run_test.pl
+
+TAO/tests/Param_Test/run_test.pl: MINIMUM
+TAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl: MINIMUM ST
+TAO/performance-tests/Cubit/TAO/MT_Cubit/run_test.pl: ST
+TAO/performance-tests/Latency/run_test.pl: MINIMUM ST
+TAO/performance-tests/POA/Object_Creation_And_Registration/run_test.pl
+TAO/performance-tests/RTCorba/Oneways/Reliable/run_test.pl: MINIMUM
+
+
+TAO/tests/OctetSeq/run_test.pl
+TAO/tests/Leader_Followers/run_test.pl: ST
+TAO/tests/Multiple_Inheritance/run_test.pl
+#HANGS TAO/tests/Endpoint_Per_Priority/run_test.pl
+TAO/tests/MT_Client/run_test.pl: ST
+TAO/tests/MT_Server/run_test.pl: ST
+TAO/tests/Faults/run_test.pl: MINIMUM
+TAO/tests/NestedUpcall/Simple/run_test.pl: ST
+TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl
+TAO/tests/NestedUpcall/Triangle_Test/run_test.pl
+TAO/tests/Nested_Event_Loop/run_test.pl
+TAO/tests/POA/Identity/run_test.pl
+TAO/tests/POA/Deactivation/run_test.pl
+TAO/tests/POA/Destruction/run_test.pl
+TAO/tests/POA/Non_Servant_Upcalls/run_test.pl
+TAO/tests/IORManipulation/run_test.pl
+TAO/tests/Policies/run_test.pl: MINIMUM ST
+TAO/tests/Timeout/run_test.pl: MINIMUM
+TAO/tests/Timed_Buffered_Oneways/run_test.pl: MINIMUM
+TAO/tests/IDL_Test/run_test.pl
+TAO/tests/ORB_init/run_test.pl
+TAO/tests/DSI_Gateway/run_test.pl: MINIMUM
+TAO/tests/DynAny_Test/run_test.pl: MINIMUM
+TAO/tests/Connection_Purging/run_test.pl: ST
+TAO/examples/Buffered_Oneways/run_test.pl: MINIMUM
+# REQUIRES AMI 'TAO/examples/Buffered_AMI/run_test.pl: MINIMUM
+TAO/tests/InterOp-Naming/run_test.pl: MINIMUM
+
+
+TAO/examples/POA/Adapter_Activator/run_test.pl: MINIMUM
+TAO/examples/POA/DSI/run_test.pl: MINIMUM
+TAO/examples/POA/Default_Servant/run_test.pl: MINIMUM
+TAO/examples/POA/Explicit_Activation/run_test.pl: MINIMUM
+TAO/examples/POA/FindPOA/run_test.pl: MINIMUM
+TAO/examples/POA/Forwarding/run_test.pl: MINIMUM
+TAO/examples/POA/NewPOA/run_test.pl: MINIMUM
+TAO/examples/POA/On_Demand_Activation/run_test.pl: MINIMUM
+TAO/examples/POA/On_Demand_Loading/run_test.pl: MINIMUM
+TAO/examples/POA/Reference_Counted_Servant/run_test.pl
+TAO/examples/POA/Loader/run_test.pl: MINIMUM
+TAO/examples/POA/RootPOA/run_test.pl
+TAO/examples/POA/Adapter_Activator/run_test.pl: MINIMUM
+TAO/examples/Simple/bank/run_test.pl
+TAO/examples/Simple/grid/run_test.pl
+TAO/examples/Simple/time-date/run_test.pl: ST
+TAO/examples/Simple/time/run_test.pl
+TAO/examples/Load_Balancing/run_test.pl: MINIMUM
+
+
+TAO/orbsvcs/tests/Simple_Naming/run_test.pl
+TAO/orbsvcs/tests/Trading/run_test.pl: MINIMUM
+TAO/orbsvcs/tests/Event/Basic/run_test.pl: ST
+TAO/orbsvcs/tests/Event/Performance/run_test.pl: ST
+TAO/orbsvcs/tests/EC_Basic/run_test.pl
+TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl: ST
+TAO/orbsvcs/tests/EC_Throughput/run_test.pl: ST
+# BREAKS LINUX 'TAO/orbsvcs/tests/EC_Mcast/run_test.pl
+# FAILS 'TAO/orbsvcs/tests/EC_Multiple/run_test.pl
+TAO/orbsvcs/tests/Event_Latency/run_test.pl
+# NO REDIRECTION TAO/examples/Simple/echo/run_test.pl < Echo.idl
+# INTERACTIVE 'TAO/examples/Simple/chat/run_test.pl
+TAO/orbsvcs/tests/Property/run_test.pl
+#HANGS TAO/orbsvcs/tests/ImplRepo/run_test.pl airplane
+#HANGS'TAO/orbsvcs/tests/ImplRepo/run_test.pl airplane_ir
diff --git a/bin/auto_run_tests.pl b/bin/auto_run_tests.pl
new file mode 100755
index 00000000000..8227473b3fb
--- /dev/null
+++ b/bin/auto_run_tests.pl
@@ -0,0 +1,114 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+# This file is for running the run_test.pl scripts listed in
+# auto_run_tests.lst.
+
+use English;
+use Getopt::Std;
+
+if (!getopts ('ac:') || $opt_h) {
+ print "run_test.pl [-h] [-c config]\n";
+ print "\n";
+ print "Runs the tests listed in auto_run_tests.lst\n";
+ print "\n";
+ print "Options:\n";
+ print " -a ACE tests only\n";
+ print " -c config Run the tests for the <config> configuration\n";
+ print " -h display this help\n";
+ print "\n";
+ print "Configs: MSVC\n";
+ exit (1);
+}
+
+use Cwd;
+
+if (!($ACE_ROOT = $ENV{ACE_ROOT})) {
+ my $cd = getcwd ();
+ chdir ('..');
+ $ACE_ROOT = getcwd ().$DIR_SEPARATOR;
+ chdir ($cd);
+ warn "ACE_ROOT not defined, defaulting to ACE_ROOT=$ACE_ROOT";
+}
+
+unshift @INC, "$ACE_ROOT/bin";
+require ACEutils;
+
+$config = 'DEFAULT';
+
+if ($opt_c) {
+ $config = $opt_c;
+}
+else {
+ print "Defaulting to configuration: $config\n";
+}
+
+
+################################################################################
+
+@tests = ();
+
+# Loads the list and runs it
+sub read_run_test_list ()
+{
+ my $line;
+ open (LIST, "<$ACE_ROOT/bin/auto_run_tests.lst")
+ || die "Cannot open $ACE_ROOT/bin/auto_run_tests.lst";
+
+ while (<LIST>) {
+ next if (/^#/ || /^\s*$/); # ignore comments and blank lines
+
+ chomp;
+ my @stuff = split ":";
+
+ if (!/$config/) {
+ my $program = shift @stuff;
+ $program =~ s/\s*//g; #remove any extra whitepace
+ push @tests, $program;
+ }
+ }
+
+ close (LIST);
+}
+
+################################################################################
+
+read_run_test_list ();
+
+foreach $test (@tests) {
+ my $directory = ".";
+ my $program = ".";
+
+ if ($opt_a && $test =~ /^TAO/) {
+ next;
+ }
+
+ if ($test =~ /(.*)\/([^\/]*)$/) {
+ $directory = $1;
+ $program = $2;
+ }
+ else {
+ $program = $test;
+ }
+
+ print "auto_run_tests: $test\n";
+
+ chdir ($ACE_ROOT."/$directory")
+ || die "Error: Cannot chdir to $ACE_ROOT/$directory";
+
+ $run_error = 0;
+
+ if (! -e $program) {
+ print STDERR "Error: $test does not exist\n";
+ next;
+ }
+
+ my $result = system ($program);
+
+ if ($result > 0) {
+ print "Error: $test returned with status $status\n";
+ }
+}
diff --git a/tests/run_test.lst b/tests/run_test.lst
new file mode 100644
index 00000000000..5960b18e0e3
--- /dev/null
+++ b/tests/run_test.lst
@@ -0,0 +1,89 @@
+# This is the list of tests that need to be run by run_test.pl.
+# Each line has its own test, and a test can be followed by a
+# list of platforms it does _not_ run on.
+#
+# Example: Foo_Test: MSVC SUNCC5 CHORUS
+
+ACE_Init_Test
+Atomic_Op_Test
+Auto_IncDec_Test
+Barrier_Test
+Basic_Types_Test
+Buffer_Stream_Test
+Cache_Map_Manager_Test
+Cached_Conn_Test
+Cached_Accept_Conn_Test
+Capabilities_Test
+CDR_Test
+CDR_File_Test
+CDR_Array_Test
+Collection_Test
+Conn_Test
+DLL_Test
+DLList_Test
+Dynamic_Priority_Test
+Enum_Interfaces_Test
+Env_Value_Test
+Future_Test
+Future_Set_Test
+Handle_Set_Test
+Hash_Map_Manager_Test
+Hash_Map_Bucket_Iterator_Test
+High_Res_Timer_Test
+IOStream_Test
+Lazy_Map_Manager_Test
+Map_Manager_Test
+Map_Test
+Mem_Map_Test
+Message_Block_Test
+Message_Queue_Notifications_Test
+Message_Queue_Test
+MM_Shared_Memory_Test
+MT_Reactor_Timer_Test
+MT_SOCK_Test
+Malloc_Test
+Naming_Test
+New_Fail_Test: MSVC
+Notify_Performance_Test
+Object_Manager_Test
+OrdMultiSet_Test
+Pipe_Test: MSVC
+Priority_Buffer_Test
+Priority_Reactor_Test
+Priority_Task_Test
+Process_Manager_Test
+Process_Mutex_Test: MSVC
+Process_Strategy_Test
+RB_Tree_Test
+Reactors_Test
+Reactor_Exceptions_Test
+Reactor_Notify_Test
+Reactor_Performance_Test
+Reactor_Timer_Test
+Reader_Writer_Test
+Recursive_Mutex_Test
+Reverse_Lock_Test
+Semaphore_Test
+Service_Config_Test
+Sigset_Ops_Test
+Simple_Message_Block_Test
+Svc_Handler_Test
+SOCK_Test
+SOCK_Connector_Test
+SOCK_Send_Recv_Test
+SPIPE_Test
+SString_Test
+SV_Shared_Memory_Test: MSVC
+Task_Test
+Thread_Manager_Test
+Thread_Mutex_Test
+Thread_Pool_Reactor_Test
+Thread_Pool_Test
+Timer_Queue_Test
+Timeprobe_Test
+Time_Service_Test
+Time_Value_Test
+Tokens_Test
+TSS_Test
+UPIPE_SAP_Test
+Upgradable_RW_Test
diff --git a/tests/run_test.pl b/tests/run_test.pl
new file mode 100755
index 00000000000..bb9886cb9e7
--- /dev/null
+++ b/tests/run_test.pl
@@ -0,0 +1,210 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+# This file is for running the tests in the ACE tests directory.
+
+unshift @INC, '../bin';
+require ACEutils;
+
+use Cwd;
+use English;
+use Getopt::Std;
+
+if (!getopts ('tc:') || $opt_h) {
+ print "run_test.pl [-h] [-c config] [-t] [file1 file2 ...]\n";
+ print "\n";
+ print "Runs the tests listed in run_test.lst\n";
+ print "\n";
+ print "Options:\n";
+ print " -c config Run the tests for the <config> platform\n";
+ print " -h display this help\n";
+ print " -t Runs all the tests passed via the cmd line\n";
+ print "\n";
+ print "Configs: MSVC\n";
+ exit (1);
+}
+
+if ($OSNAME eq 'MSWin32') {
+ $config = 'MSVC';
+}
+
+if ($opt_c) {
+ $config = $opt_c;
+}
+else {
+ print "Defaulting to configuration: $config\n";
+}
+
+if (!($ACE_ROOT = $ENV{ACE_ROOT})) {
+ my $cd = getcwd ();
+ chdir ('..');
+ $ACE_ROOT = getcwd ().$DIR_SEPARATOR;
+ chdir ($cd);
+ warn "ACE_ROOT not defined, defaulting to ACE_ROOT=$ACE_ROOT";
+}
+
+if (!($tmp = $ENV{TMP})) {
+ $tmp="/tmp";
+}
+
+################################################################################
+
+@tests = ();
+
+# Loads the list and runs it
+sub read_run_test_list ()
+{
+ my $line;
+ open (LIST, "<run_test.lst")
+ || die "Cannot open run_test.lst";
+
+ while (<LIST>) {
+ next if (/^#/ || /^\s*$/); # ignore comments and blank lines
+
+ chomp;
+ my @stuff = split ":";
+
+ if (!/$config/) {
+ my $program = shift @stuff;
+ $program =~ s/\s*//g; #remove any extra whitepace
+ push @tests, $program;
+ }
+ }
+
+ close (LIST);
+}
+
+sub run_program ($)
+{
+ my $program = shift;
+
+ $program_exe = $EXEPREFIX.$program.$EXE_EXT;
+
+ unlink "core";
+ local $log = "log/".$program.".log";
+ unlink $log;
+
+ ### Try to run the program
+
+ if (! -x $program_exe) {
+ print STDERR "Error: $program_exe does not exist\n";
+ return;
+ }
+
+ print STDERR "Running $program\n";
+ $P = Process::Create ($program_exe, "");
+ $status = $P->TimedWait (300);
+
+ if ($status == -1) {
+ print STDERR "Error: $program FAILED (time out)\n";
+ $P->Kill (); $P->TimedWait (1);
+ } elsif ($status != 0) {
+ print STDERR "Error: $program FAILED with exit status $status\n";
+ }
+
+ check_log ($log);
+}
+
+sub check_log ($)
+{
+ my $log = shift;
+ ### Check the logs
+ if (-e "core") {
+ print STDERR "$program dumped core!!!!\n";
+ }
+ if (! -e $log ) {
+ print STDERR "Error: No log file ($log) is present\n";
+ } else {
+ if (open (LOG, "<". $log) == 0) {
+ print STDERR "Error: Cannot open log file $log\n";
+ } else {
+ my $starting_matched = 0;
+ my $ending_matched = 0;
+ my $bad_matched = 0;
+
+ while (<LOG>) {
+ chomp;
+
+ if (m/Starting/) {
+ $starting_matched = 1;
+ }
+
+ if (m/Ending/) {
+ $ending_matched = 1;
+ }
+
+ if (m/assertion failed|timeout|Bad file number/) {
+ $bad_matched = 1;
+ }
+
+ if ($log =~ /Cached_Accept_Conn_Test/
+ && m/No such file or directory/) {
+ $bad_matched = 1;
+ }
+
+ if (m/not supported/) {
+ print STDERR "Error: ($log): $_\n";
+ }
+ }
+
+ close (LOG); # ignore errors
+
+ if ($starting_matched == 0) {
+ print STDERR "Error ($log): no line with 'starting'\n";
+ }
+
+ if ($ending_matched == 0) {
+ print STDERR "Error ($log): no line with 'Ending'\n";
+ }
+
+ if ($bad_matched == 1) {
+ print STDERR "Error ($log): unexpected output\n";
+ }
+
+ }
+ }
+}
+
+sub delete_temp_files ()
+{
+ unlink "ace_pipe_name";
+ unlink "pattern";
+
+ if (!opendir (DIR, $tmp)) {
+ warn "Cannot open temp directory $tmp\n";
+ return;
+ }
+
+ my @files =readdir (DIR);
+ closedir (DIR);
+
+ my $file = "";
+ foreach $file (@files) {
+ if ($file =~ /^ace_temp_file/
+ || $file =~ /^Naming_Test/)
+ {
+ unlink $tmp.$DIR_SEPARATOR.$file;
+ }
+ }
+}
+
+################################################################################
+
+if (!$opt_t) {
+ read_run_test_list ();
+}
+else {
+ @tests = @ARGV;
+}
+
+foreach $test (@tests) {
+ run_program ($test);
+}
+
+delete_temp_files ();
+
+exit ();
+