Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /trunk/rtest/scripts/run_sh.in
ViewVC logotype

Diff of /trunk/rtest/scripts/run_sh.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1415, Thu Jun 30 15:23:31 2011 UTC revision 1416, Thu Jun 30 15:51:19 2011 UTC
# Line 2  Line 2 
2  #  #
3  # A script for running the Diderot regression tests.  # A script for running the Diderot regression tests.
4  #  #
5    # usage:
6    #       scripts/run.sh [diderotc] [diderotc-flags] [-- runtime-flags]
7    #
8  # @configure_input@  # @configure_input@
9  #  #
10    
# Line 9  Line 12 
12  #  #
13  PATH=/bin:/usr/bin:@TEEM_DIR@/bin  PATH=/bin:/usr/bin:@TEEM_DIR@/bin
14    
15    function usage {
16      echo "usage:"
17      echo "  scripts/run.sh [diderotc] [diderotc-flags] [-- runtime-flags]"
18      exit $1
19    }
20    
21  # this script should be run from the rtest directory  # this script should be run from the rtest directory
22  #  #
23  HERE=$(pwd)  HERE=$(pwd)
# Line 21  Line 30 
30  #  #
31  DIDEROTC="@DIDEROT_BINDIR@/diderotc"  DIDEROTC="@DIDEROT_BINDIR@/diderotc"
32  DIDEROTC_FLAGS=""  DIDEROTC_FLAGS=""
33    RUNTIME_FLAGS=""
34    if [ $# -ne 0 ] ; then
35      # first we check for the diderotc command
36      case $1 in
37        -*) ;; # no diderot command
38        /*) DIDEROTC=$1; shift ;; # absolute path
39        *) DIDEROTC=$HERE/$1; shift ;; #relative path
40      esac
41      # get diderotc flags
42  while [ $# -ne 0 ] ; do  while [ $# -ne 0 ] ; do
43    case $1 in    case $1 in
44          --) shift; break ;; # switch modes
45      -*) DIDEROTC_FLAGS="$DIDEROTC_FLAGS $1" ;;      -*) DIDEROTC_FLAGS="$DIDEROTC_FLAGS $1" ;;
46      *) if [ -x $1 ] ; then        *) echo "unrecognized argument"
47          case $1 in          usage 1
48            /*) DIDEROTC=$1 ;; # absolute path        ;;
           *) DIDEROTC=$HERE/$1 ;; #relative path  
49          esac          esac
50        else      shift
51          echo "unrecognized argument"    done
52          exit 1    # get runtime flags
53        fi    while [ $# -ne 0 ] ; do
54        case $1 in
55          -*) RUNTIME_FLAGS="$RUNTIME_FLAGS $1" ;;
56          *) echo "unrecognized argument"
57            usage 1
58      ;;      ;;
59    esac    esac
60    shift    shift
61  done  done
62    fi
63    
64    #
65    # check that the diderotc path is valid
66    #
67    if [ ! -x $DIDEROTC ] ; then
68      echo "$DIDEROTC is not executable or does not exist"
69      exit 1
70    fi
71    
72  # get a list of all of the tests (one per directory)  # get a list of all of the tests (one per directory)
73  #  #
# Line 46  Line 77 
77  LOG=$HERE/log.$DATE  LOG=$HERE/log.$DATE
78  REPORT=$HERE/report.$DATE  REPORT=$HERE/report.$DATE
79    
80  echo "testing $DIDEROTC" > $REPORT  echo "testing $DIDEROTC $DIDEROTC_FLAGS" > $REPORT
81  for t in $TESTS ; do  for t in $TESTS ; do
82  ( cd tests/$t;  ( cd tests/$t;
83    echo "********** $t **********" >> $LOG    echo "********** $t **********" >> $LOG
# Line 55  Line 86 
86    $DIDEROTC $DIDEROTC_FLAGS $t.diderot 2>> $LOG 1>> $LOG    $DIDEROTC $DIDEROTC_FLAGS $t.diderot 2>> $LOG 1>> $LOG
87    if [ "$?" -eq "0" ] ; then    if [ "$?" -eq "0" ] ; then
88      echo -n "compile succeeded ... " >> $REPORT      echo -n "compile succeeded ... " >> $REPORT
89      echo "./$t" >> $LOG      echo "./$t $RUNTIME_FLAGS" >> $LOG
90      ./$t 2>> $LOG 1>> $LOG      ./$t $RUNTIME_FLAGS 2>> $LOG 1>> $LOG
91      if [ "$?" -eq "0" ] ; then      if [ "$?" -eq "0" ] ; then
92        echo -n "execution succeeded ... " >> $REPORT        echo -n "execution succeeded ... " >> $REPORT
93        result=$(./assess.sh)        result=$(./assess.sh)

Legend:
Removed from v.1415  
changed lines
  Added in v.1416

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0