# HG changeset patch # User Paul Boddie # Date 1472586763 -7200 # Node ID 43b16576fa8ba5f1cc6847c90c64ae33d46c2363 # Parent 3dff1f10598f38384145bc7149361e5a08ab64f2 Added test runner script. diff -r 3dff1f10598f -r 43b16576fa8b test_all.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test_all.sh Tue Aug 30 21:52:43 2016 +0200 @@ -0,0 +1,27 @@ +#!/bin/sh + +for FILENAME in tests/* ; do + + # Detect tests in their own subdirectories. + + if [ -d "$FILENAME" ] ; then + if [ -e "$FILENAME/main.py" ] ; then + FILENAME="$FILENAME/main.py" + else + continue + fi + fi + + # Run tests without an existing cache. + + echo "$FILENAME..." 1>&2 + if ! ./lplc "$FILENAME" -r ; then exit 1 ; fi + echo 1>&2 + + # Run tests with an existing cache. + + echo "$FILENAME (cached)..." 1>&2 + if ! ./lplc "$FILENAME" ; then exit 1 ; fi + echo 1>&2 + +done