2 # ----------------------------------------------------------------
3 # This script runs specified (or default) test macros
4 # for all versions of one detector if it specified
5 # or for all detectors otherwise
7 # Usage: test_run.sh detName [-g genNumber] [-v visNumber]
8 # for all detectors: detName = ALL
10 # 5.11.99 I. Hrivnacova
12 # check input parameters
15 echo "test_run.sh detName [-g genNumber] [-v visNumber]"
16 echo " for all detectors: detName = ALL"
25 # get input parameters
36 TO=$AG4_INSTALL/"test"
40 if [ "$DIR" = "ALL" ]; then
41 # loop over all detectors if det is not specified
46 until [ "$VER" = "$MAX" ] ; do
47 if [ -f "v"$VER"_test"$GEN""$VIS".in" ] ; then
48 echo "test_run_in.sh $DIR v$VER test$GEN$VIS"
49 test_run_in.sh $DIR -d $VER -g $GEN -v $VIS
58 # loop over all structures
59 if [ "$DIR" = "STRUCT" ]; then
61 for MODULE in `ls`; do
63 until [ "$VER" = "$MAX" ] ; do
64 if [ -f $MODULE/"v"$VER"_test"$GEN""$VIS".in" ]; then
65 echo "test_run_struct.sh $MODULE v$VER test$GEN$VIS"
66 test_run_struct.sh $MODULE -d $VER -g $GEN -v $VIS
73 # run for specified detector only
77 until [ "$VER" = "$MAX" ] ; do
78 if [ -f "v"$VER"_test"$GEN""$VIS".in" ] ; then
79 echo "test_run_in.sh $DIR v$VER test$GEN$VIS"
80 test_run_in.sh $DIR -d $VER -g $GEN -v $VIS