File: regressionTesting.sh

package info (click to toggle)
r-cran-openmx 2.21.13%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,716 kB
  • sloc: cpp: 36,559; ansic: 13,821; fortran: 2,001; sh: 1,440; python: 350; perl: 21; makefile: 11
file content (58 lines) | stat: -rwxr-xr-x 1,214 bytes parent folder | download | duplicates (3)
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
#!/bin/bash
if [ "$#" -ne "5" ];
then
    echo ""
    echo "expected arguments: [NEWDIR] [OUTDIR] [START-REV] [END-REV] [OPENMX]"
    echo ""
    exit
fi

if [ -d $1 ];
then
    echo ""
    echo "The argument $1 must point to a directory that is not present."
    echo ""
    exit
fi

if [ ! -d $2 ];
then
    echo ""
    echo "The argument $2 must point to a directory that is present."
    echo ""
    exit
fi

if [ ! -d $5 ];
then
    echo ""
    echo "The argument $5 must point to a directory that is present."
    echo ""
    exit
fi

SVN_ROOT=$1
OUTPUT_DIR=`cd $2; pwd`
START_REVISION=$3
END_REVISION=$4
OPENMX_DIR=`cd $5; pwd`

mkdir -p $SVN_ROOT
svn checkout -r $START_REVISION http://openmx.psyc.virginia.edu/svn/trunk $SVN_ROOT
cd $SVN_ROOT
for ((rev=$START_REVISION; rev <= $END_REVISION; rev++))
do
   svn update -r $rev --non-interactive
   make install
   pushd $OPENMX_DIR
   make nightly > performance.results
   awk '/Runtimes:/ {flag=1}flag' performance.results | tail -n +2 | sed '$d' > performance.data
   cat performance.data | while read line;
   do
      set $line
      location=`basename $1`
      echo -e "$rev\t$2" >> $OUTPUT_DIR/$location.results
   done
   popd
done
rm -rf $SVN_ROOT