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 1179, Tue May 10 22:56:32 2011 UTC revision 1180, Wed May 11 12:48:05 2011 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/ksh
2  #  #
3  # A script for running the Diderot regression tests.  # A script for running the Diderot regression tests.
4  #  #
5  # @configure_input@  # @configure_input@
6  #  #
7    # TODO:
8    #       pick version of diderotc compiler to test
9    #       pass command-line arguments to the compiler
10    #
11    
12  # set up the path so that we can find diderotc and unu  # set up the path so that we can find diderotc and unu
13  #  #
# Line 22  Line 26 
26  TESTS=$(cd tests; ls)  TESTS=$(cd tests; ls)
27    
28  DATE=$( date +"%F-%H-%M-%S" )  DATE=$( date +"%F-%H-%M-%S" )
29    LOG=$HERE/log.$DATE
30    REPORT=$HERE/report.$DATE
31    
32  for t in $TESTS ; do  for t in $TESTS ; do
33  ( cd $t;  ( cd tests/$t;
34    echo -n "checking $t ..." >> $LOG    echo "********** $t **********" >> $LOG
35    diderotc $t.diderot    echo -n "checking $t ..." >> $REPORT
36      echo "diderotc $t.diderot" >> $LOG
37      diderotc $t.diderot 2>> $LOG 1>> $LOG
38    if [ "$?" -eq "0" ] ; then    if [ "$?" -eq "0" ] ; then
39      echo -n " compile succeeded ..." >> $LOG      echo -n " compile succeeded ..." >> $REPORT
40      ./$t      echo "./$t" >> $LOG
41        ./$t 2>> $LOG 1>> $LOG
42      if [ "$?" -eq "0" ] ; then      if [ "$?" -eq "0" ] ; then
43        echo -n " execution succeeded ..." >> $LOG        echo -n " execution succeeded ..." >> $REPORT
44        ./assess.sh        result=$(./assess.sh)
45          if (($result < 1.0)) ; then
46            echo "result is good ($result)" >> $REPORT
47            echo "ok" >> $LOG
48            echo "$t is okay"
49            rm -f $t.c $t.o $t $t.log mip.txt
50          else
51            echo "result if bad ($result)" >> $REPORT
52            echo "$t failed"
53          fi
54      else      else
55        echo " execution failed" >> $LOG        echo " execution failed" >> $REPORT
56          echo "$t failed"
57      fi      fi
58    else    else
59      echo " compile failed" >> $LOG      echo " compile failed" >> $REPORT
60        echo "$t failed"
61    fi    fi
62      echo "**********" >> $LOG
63    )
64  done  done
65    echo "complete report at $REPORT"

Legend:
Removed from v.1179  
changed lines
  Added in v.1180

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