Changeset 130

Show
Ignore:
Timestamp:
04/14/07 06:15:59
Author:
apokayi
Message:

add additional runtime negative units
modify the script accordingly

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • guts_main/guts_main.sh

    r127 r130  
    2828NP=$1 
    2929UNITS=units 
     30RNUNITS=units_runtime_neg 
    3031UNITS_NEG=units_neg 
     32 
    3133echo "Running the testing suite for ${NP} threads" 
    3234echo -ne "\n" 
     
    7678done  
    7779 
    78 # compile and run the negative UNITS 
     80# compile the negative UNITS 
    7981# these UNITS should raise compiler ERRORS  
    8082 
     
    8284        echo -e "-------------->      Working on unit -- $NUNIT\n" 
    8385 
    84         build_output=`$UPCC -T=${NP} -I../include $iNUNIT.upc -o $NUNIT >>$NUNIT.out 2>$NUNIT.errout
     86        build_output=`$UPCC -T=${NP} -I../include $NUNIT.upc -o $NUNIT
    8587 
    8688         if [ $? -eq 0 ] ; then 
     
    112114done 
    113115 
     116# following loop will work for negative units which expect to raise ERROR at runtime 
     117 
     118for RNUNIT in `cat ${RNUNITS}`; do 
     119        echo -e "-------------->      Working on unit -- $RNUNIT\n" 
     120 
     121        build_output=`$UPCC -T=${NP} -I../include $RNUNIT.upc -o $RNUNIT >>$RNUNIT.out 2>$RNUNIT.errout` 
     122 
     123        if [ $? -eq 0 ] ; then 
     124                echo $build_output 
     125                echo "Compilation was SUCCESSFUL for the unit [${RNUNIT}]" 
     126                echo "Now the unit [${RNUNIT}] will be run for ${NP} threads ..." 
     127                echo "Note that this is a negative unit which MUST raise a RUNTIME ERROR" 
     128                RUN=`eval echo "upcrun -qn ${NP} ${RNUNIT}"` 
     129                echo $RUN 
     130                exe_output=`$RUN` 
     131                if [ $? -eq 0 ] ; then 
     132                        echo -e "TEST \033[31m\033[1mFAILED\033[0m for the unit [$UNIT]" 
     133                        echo "$UNIT" >>units.notpassed 
     134                        failed=$((failed+1)) 
     135                else 
     136                        echo -e "TEST \033[34m\033[1mPASSED\033[0m for the unit [$UNIT]" 
     137                        echo "$UNIT" >>units.passed 
     138                        passed=$((passed+1)) 
     139                fi 
     140 
     141        else 
     142                echo "COMPILER ERROR: The unit [$RNUNIT] cannot be compiled" 
     143                echo "The unit will not be run!!!" 
     144                cat $RNUNIT.errout 
     145                echo "$RNUNIT" >>units.notpassed 
     146                failed=$((failed+1)) 
     147                cmp_failed=$((cmp_failed+1)) 
     148        fi 
     149 
     150        `rm -f *.o ${RNUNIT} ${RNUNIT}.*out` 
     151 
     152        echo -ne "\n" 
     153        echo -e "===============================================================================\n" 
     154done 
     155 
    114156 
    115157# STATISTICAL OUTPUT 
  • guts_main/src/units_neg

    r127 r130  
    1 array_declarators_dynamic_neg 
    21barrier2_neg 
    3 barrier3_neg 
    4 barrier4_neg 
    52barrier_neg 
    63blocksize_neg