[SCM] Lisaac compiler branch, master+stable, updated. lisaac-0.12-606-gf445725

Mildred Ki'Lya silkensedai at online.fr
Mon Mar 1 00:35:38 UTC 2010


The following commit has been merged in the master+stable branch:
commit fa05a1e1d837ebf5559536c108a7c3ae31e96985
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date:   Wed Feb 10 22:01:23 2010 +0100

    Updated tests

diff --git a/run-tests.sh b/run-tests.sh
index e7be8fd..dff7dab 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -6,6 +6,7 @@ op_runcwd=false
 op_testname="`pwd`"
 op_importance=0
 op_importance_max=-1
+op_report=
 
 while [ $# -gt 0 ]; do
   case "$1" in
@@ -24,6 +25,10 @@ while [ $# -gt 0 ]; do
       op_importance_max="$2"
       shift 2
       ;;
+    -r)
+      op_report="$2"
+      shift 2
+      ;;
     -h|-help|--help)
       echo "NAME"
       echo "  run-tests.sh - automatically run tests for the Lisaac compiler"
@@ -43,6 +48,9 @@ while [ $# -gt 0 ]; do
       echo "  -I IMPORTANCE"
       echo "      Run only tests that have an importance less than IMPORTANCE"
       echo
+      echo "  -r REPORT"
+      echo "      write report REPORT"
+      echo
       echo "  -d DIR"
       echo "      Run test in DIR"
       exit 0
@@ -94,15 +102,23 @@ test-patterns(){
 run_test(){
   local oldcwd="`pwd`"
   local res
-  if [ -n "$1" ]; then
-    cd "$1"
+  local testpath="$1"
+  if [ -n "$testpath" ]; then
+    cd "$testpath"
+  fi
+  local imp
+  if [ -f make.lip ]; then
+    imp="`lisaac -test-importance 2>&1`"
+  elif [ -f importance ]; then
+    imp="`cat importance`"
+  else
+    imp=0
   fi
-  imp="`lisaac -test-importance`"
   if [ "0$imp" -lt "0$op_importance" ] || ( \
      [ 0 -le "$op_importance_max" ] && [ "0$imp" -ge "0$op_importance_max" ] )
   then
     cd "$oldcwd"
-    return 0
+    return 255
   fi
   res=1
   echo
@@ -174,7 +190,7 @@ run_test(){
       fi
     fi
   else
-    echo "Unknown test: $op_testname"
+    echo "Unknown test: $testpath"
   fi
   if [ $res != 0 ]; then
     header 80 ' ' "error: $res"
@@ -199,26 +215,66 @@ if $op_default; then
     export PATH="`pwd`:$PATH"
   fi
   n=0
+  ignored=()
+  success=()
   failed=()
+  expected_failed=()
   for f in tests/*; do
     if [ -d "$f" ]; then
       run_test "$f"
       res=$?
-      if [ $res != 0 ]; then
+      if [ $res = 255 ]; then
+        ignored=("${ignored[@]}" $f)
+      elif [ $res = 0 ]; then
+        success=("${success[@]}" $f)
+      elif [ -f "$f/fail" ]; then
+        expected_failed=("${expected_failed[@]}" $f)
+      else
         failed=("${failed[@]}" $f)
+        n=$(($n+$res))
       fi
-      n=$(($n+$res))
     fi
   done
   echo
+  echo "Summary:"
+  echo
+  for f in "${success[@]}"; do
+    echo " - SUCCESS: $f"
+  done
+  [ "${#success}" -gt 0 ] && echo
+  for f in "${expected_failed[@]}"; do
+    echo " - FAILURE EXPECTED: $f"
+  done
+  [ "${#expected_failed}" -gt 0 ] && echo
+  for f in "${ignored[@]}"; do
+    echo " - IGNORED: $f"
+  done
+  [ "${#ignored}" -gt 0 ] && echo
+  for f in "${failed[@]}"; do
+    echo " - FAILURE: $f"
+  done
+  [ "${#failed}" -gt 0 ] && echo
   if [ $n = 0 ]; then
     echo "*** SUCCESS ***"
   else
     echo "*** FAILURE ***"
+  fi
+  echo
+  if [ -n "$op_report" ]; then
+    (
+    for f in "${success[@]}"; do
+      echo "SUCCESS:$f"
+    done
+    for f in "${expected_failed[@]}"; do
+      echo "FAILURE_EXPECTED:$f"
+    done
+    for f in "${ignored[@]}"; do
+      echo "IGNORED:$f"
+    done
     for f in "${failed[@]}"; do
-      echo " - $f"
+      echo "FAILURE:$f"
     done
-    echo
+    ) > "$op_report"
   fi
   exit $n
 fi
diff --git a/tests/strict_type_parameter/fail b/tests/strict_type_parameter/fail
new file mode 100644
index 0000000..e69de29

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list