#!/bin/bash

SCRIPTFLAGS=
while [ $# -gt 0 ]; do
case $1 in
"-coverage") SCRIPTFLAGS+=" -coverage"; shift 1 ;;
"-rt2") SCRIPTFLAGS=" -rt2"; shift 1 ;;
*) echo "Usage: $0 [-rt2] [-coverage]"; exit 1 ;;
esac
done

echo "Batch execution of SA tests: creating 1 report for each script file"
echo "You must have a symlink in this directory named perl and pointing to perl 5.6.0 or higher"

echo "./perl SAtester.pl $SCRIPTFLAGS -log SA_log.report *.script"
./perl SAtester.pl $SCRIPTFLAGS -log SA_log.report *.script
