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
51 if [ "$VER" = "d" ]; then
62 # loop over all structures
63 if [ "$DIR" = "STRUCT" ]; then
65 for MODULE in `ls`; do
67 until [ "$VER" = "$MAX" ] ; do
68 if [ -f $MODULE/"v"$VER"_test"$GEN""$VIS".in" ]; then
69 echo "test_run_struct.sh $MODULE v$VER test$GEN$VIS"
70 test_run_struct.sh $MODULE -d $VER -g $GEN -v $VIS
72 if [ "$VER" = "d" ]; then
81 # run for specified detector only
85 until [ "$VER" = "$MAX" ] ; do
86 if [ -f "v"$VER"_test"$GEN""$VIS".in" ] ; then
87 echo "test_run_in.sh $DIR v$VER test$GEN$VIS"
88 test_run_in.sh $DIR -d $VER -g $GEN -v $VIS