summaryrefslogtreecommitdiff
path: root/tests/run_tests.sh
blob: cd66c79d4f16a8375df0f834a0b14ed3e0bdb158 (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#!/bin/sh -f
# $Id$
#
# This is the UNIX version of the one-button ACE tests.
# Contributed by Michael Rueger <m_rueger@SYSCOMP.DE>
#
# It also supports remote invocation on a CHORUS/ClassiX/MVME target.
# For that environment, these steps are required:
# 1) Create a "log" directory below the root mount point on the host.
# 2) Mount the "tests" directory on the target, and add it to the PATH
#    on the target.
# 3) cd to the directory that contains this script on the host.
# 4) Create a symlink to the "log" directory create in step 1) above.
# 5) ./run_tests.sh <target_hostname>

usage="usage: $0 <target>"
IFS="|"
tmp=/tmp

####
#### Process command line arguments.
####
target=
run_command=
chorus=
if [ $# -eq 1 ]; then
  target=$1
  if rsh $target help | head -1 | egrep CHORUS/ClassiX > /dev/null; then
    run_command=arun
    chorus=1
  else
    #### Only support Chorus/MVME, for now.
    echo $0: host $1 does not appear to be Chorus/MVME:  not supported.
  fi
elif [ $# -ne 0 ]; then
  echo $usage
  exit 1
fi

run()
{
  echo running $1
  /bin/rm -f core log/$1.log

  if [ "$chorus" ]; then
    #### Assumes that the PATH has been set on the target.
    rsh $target $run_command $1
  else
    ./$1
  fi
  status=$?

  if [ $status -ne 0 ]; then
    echo \"$1\" FAILED with exit status $status!!!!
  fi

  if [ -f core ]; then
    echo \"$1\" dumped core!!!!
  fi

  if [ -f log/$1.log ]; then
    ./run_tests.check log/$1.log
  else
    echo "No log file (log/$1.log) is present"
  fi
}

if [ -x /bin/uname -a `uname -s` = 'LynxOS' ]; then
  LynxOS=1
fi

echo "Starting tests..."

run Basic_Types_Test
test $chorus || run Env_Value_Test	# uses Env_Value_T and Process
run Atomic_Op_Test                      # uses Atomic_Op
run TSS_Test                            # uses Task, Mutex, Guard
run Timeprobe_Test
run Time_Value_Test
run SString_Test
test $chorus || test $LynxOS || run Naming_Test # uses Naming_Context, WString

run Handle_Set_Test                     # uses Handle_Set
run OrdMultiSet_Test                    # uses Ordered_MultiSet
test $chorus || run Mem_Map_Test        # uses Mem_Map

run SV_Shared_Memory_Test               # uses SV_Shared_Memory, fork
test $chorus || run MM_Shared_Memory_Test

run Sigset_Ops_Test                     # uses sigset*() functions

test $LynxOS || run Timer_Queue_Test    # uses Event_Handler, Timer_Queue

run SOCK_Connector_Test                 # uses SOCK_Connector

run Task_Test                           # uses Thread_Manager, Task
run Thread_Manager_Test                 # uses Thread_Manager, Task
run Thread_Pool_Test                    # uses Thread_Manager, Task
run Future_Test                         # uses Thread_Manager, Task
run Reactors_Test                       # uses Task, Mutex, Reactor
run Reactor_Exceptions_Test             # uses Reactor and C++ exceptions
run Reactor_Notify_Test                 # uses Reactor's notify() method, Task
run Reactor_Timer_Test                  # uses Event_Handler, Reactor
test $chorus || test $LynxOS || run Reactor_Performance_Test # uses Event_Handler, Reactor
run Notify_Performance_Test             # uses Event_Handler, Reactor
run Reader_Writer_Test                  # uses Thread_Manager, Mutex
test $chorus || test $LynxOS || run Priority_Reactor_Test # uses Priority_Reactor, Acceptor/Connector...
test $chorus || run SOCK_Test           # uses Thread_Manager, SOCK_SAP
test $chorus || run MT_SOCK_Test        # uses Thread_Manager, Acceptor/Connector

# ifdef ACE_HAS_STREAM_PIPES
run SPIPE_Test                          # uses SPIPE_Acceptor/Connector, Thread_Manager
run UPIPE_SAP_Test                      # uses UPIPE, Thread, Thread_Manager

run Barrier_Test                        # uses Service_Config, Barrier
run Buffer_Stream_Test                  # uses Service_Config, Module (Stream,Task, Message_Queue)
run Priority_Buffer_Test                # uses Service_Config, Message_Queue
run Recursive_Mutex_Test                # uses Service_Config, Recursive_Thread_Mutex

test $chorus || test $LynxOS || run Time_Service_Test # uses libnetsvcs
test $chorus || test $LynxOS || run Tokens_Test

run Map_Manager_Test                    # uses Map Manager and Hash Map Manager + Forward and Reverse Map Iterators.
run Message_Queue_Notifications_Test    # uses Message_Queue + Reactor.
test $chorus || run Message_Queue_Test  # uses Message_Queue + Forward and Reverse Message Queue Iterators.
test $chorus || run Simple_Message_Block_Test # uses Message_Block
test $chorus || run Message_Block_Test  # uses Message_Block and Message_Queue
test $chorus || run Pipe_Test           # uses Pipe
test $chorus || run Process_Mutex_Test  # uses Process_Mutex
test $chorus || run Thread_Mutex_Test   # uses Thread_Process_Mutex
test $chorus || run Process_Strategy_Test # uses ACE_Strategy_Acceptor
run Service_Config_Test                 # uses Service_Config
run Priority_Task_Test                  # uses Task with priorities
run IOStream_Test                       # uses ACE_IOStream and ACE_SOCK_Stream
run Enum_Interfaces_Test                # uses ACE::get_ip_interfaces()
test $chorus || run Conn_Test           # uses Thread_Manager, Acceptor/Connector, SOCK_SAP

echo "Tests complete..."

/bin/rm -f ace_pipe_name pattern $tmp/ace_temp_file $tmp/ace_temp_file2 $tmp/ace_test_file $tmp/Naming_Test*
echo; echo
ipcs

# EOF