#!/usr/bin/env bash
# $LastChangedDate: 2010-05-25 21:26:05 -0400 (Tue, 25 May 2010) $
# LEGAL: COPYRIGHT (C) 2010 JIM E. BROOKS WWW.PALOMINO3D.ORG
# Run tests forever in one subdir.

if [ ! -d out ]; then
    echo "ERROR: Need to build tests."
    exit 1
fi

while true :
do
    for TEST in out/*
    do
        if [ -x $TEST ] && [ ! -d $TEST ]; then
            echo "---  running test $TEST ---"
            if ( ! $TEST ); then
            echo "---  test $TEST FAILED! ---"
                exit 1
            fi
        fi
    done

    echo "*************************"
    echo "* All tests passed (ok) *"
    echo "*************************"
done
