Changes in test_all.sh [b21cb9:e24c78]
- File:
-
- 1 edited
-
test_all.sh (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
test_all.sh
rb21cb9 re24c78 23 23 docheck=0; 24 24 docheck_mem=0; 25 if [ -n "$TMPDIR" ] 26 then 27 tmpdir="$TMPDIR"; 28 else 29 tmpdir="/tmp"; 30 fi 31 tmppattern="MolecuilderTest"; 25 32 26 33 function usage(){ … … 36 43 echo " -c Only configure and compile (implies -s)"; 37 44 echo " -O <opt-level> Only compile this optimization level"; 38 } 39 40 while getopts âho:f:scO:â OPTION 45 echo " -t <tmpDir> Use tmpDir as temporary directory"; 46 echo " -p <prefix> Prefix to use for directory names (standart MolecuilderTest)"; 47 } 48 49 while getopts âho:f:scO:t:p:â OPTION 41 50 do 42 51 case $OPTION in … … 46 55 ;; 47 56 o) 48 outfile= $OPTARG;57 outfile="$OPTARG"; 49 58 ;; 50 59 f) 51 logfile= $OPTARG;60 logfile="$OPTARG"; 52 61 ;; 53 62 s) … … 61 70 optimizations=("-O$OPTARG"); 62 71 ;; 72 t) 73 tmpdir="$OPTARG"; 74 ;; 75 p) 76 tmppattern="$OPTARG"; 77 ;; 63 78 ?) 64 79 usage; … … 68 83 done 69 84 70 if [[ -z $outfile ]] || [[ -z $logfile ]] 85 # test if all arguments were provided 86 if [[ -z "$outfile" ]] || [[ -z "$logfile" ]] || [[ -z "$tmpdir" ]] || [[ -z "$tmppattern" ]] 71 87 then 72 88 usage; … … 74 90 fi 75 91 92 # turn all relative paths into absolutes 76 93 outfile=`realpath -s $outfile`; 77 94 logfile=`realpath -s $logfile`; 95 tmpdir=`realpath -s $tmpdir`; 78 96 79 97 … … 98 116 echo "Valgrinding"; 99 117 retval=0; 100 for test in molecuilder/src/unittests/*118 for test in src/unittests/* 101 119 do 102 120 if [ -x "$test" ] … … 119 137 120 138 echo "Testing with \"$2\""; 139 echo "" >> $logfile; 140 echo "" >> $logfile; 141 echo "" >> $logfile; 142 echo "Testing with \"$2\"" >> $logfile; 121 143 122 144 echo -n " Configuring: " >> $outfile; … … 167 189 function run(){ 168 190 echo "Testing with \"$1\":" >> $outfile; 169 testdir=`mktemp -d --tmpdir MolecuilderTest.XXXXXXXXXX`;191 testdir=`mktemp -d --tmpdir=$tmpdir $tmppattern.XXXXXXXXXX`; 170 192 basedir=$PWD; 171 193 cd $testdir;
Note:
See TracChangeset
for help on using the changeset viewer.
