source: trunk/source/geometry/solids/test/SBT/script/sbt.sh @ 1350

Last change on this file since 1350 was 1350, checked in by garnier, 13 years ago

update to last version 4.9.4

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/sh
2#
3# $Id: sbt.sh,v 1.2 2008/01/25 17:09:50 ivana Exp $
4#
5# This script must be run from the top level directory where is SBT installed;
6# it calls the SBT program with the selected geant4 macro in SBT/geant4 directory.
7# The argument has to specify the solid name.
8
9if [ $# -ne 1 ]
10then
11  echo
12  echo "Usage: sbt.sh solidname"
13  echo
14  exit 1
15fi
16
17SOLID=$1
18INPUT=geant4/${SOLID}.geant4
19OUTPUT=log/SBT.${SOLID}.out
20LOG=log/SBT.${SOLID}.log
21
22COUNTERR="awk -f script/counterr.awk log/${SOLID}.*.log"
23COUNTVOXELERR="awk -f script/countvoxelerr.awk log/${SOLID}v.*.log"
24
25rm -f ${LOG}
26rm -f ${OUTPUT}
27rm -f tmp.out
28
29# Run the test
30#
31{ time SBT < ${INPUT} >& ${LOG}; } >& tmp.out
32
33# Print the time and error statistics
34#
35echo "SBT test for $SOLID"  >> ${OUTPUT}
36echo >> ${OUTPUT}
37
38# Run tests
39if [ "`ls log/${SOLID}.*.log 2> /dev/null`" != "" ]
40then 
41  ${COUNTERR} >> ${OUTPUT}
42else
43  echo "No run test output"  >> ${OUTPUT}   
44fi
45
46# Voxel tests
47if [ "`ls log/${SOLID}v.*.log 2> /dev/null`" != "" ]
48then 
49  ${COUNTVOXELERR} >> ${OUTPUT}
50else
51  echo "No voxel test output" >> ${OUTPUT} 
52fi
53
54echo >> ${OUTPUT}
55echo "Time:"  >> ${OUTPUT}
56cat tmp.out >> ${OUTPUT}
57rm -f tmp.out
Note: See TracBrowser for help on using the repository browser.