PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/test/test_all.sh

http://github.com/tybor/Liberty
Shell | 34 lines | 16 code | 4 blank | 14 comment | 4 complexity | 7bcaf275c9c9c6eab77e4540870e7aea MD5 | raw file
 1#!/usr/bin/env bash
 2
 3# Nominal usage:
 4# --------------
 5# $ ./test_all.sh
 6#
 7# Example of specific usage:
 8# --------------------------
 9# $ cd language/agent
10# $ INTERPRETER=libertyi LOG=trace CHECK=require ../../test_all.sh
11#
12# Example of specific test call:
13# ------------------------------
14# $ cd language/agent
15# $ INTERPRETER=libertyi LOG=trace CHECK=all DEBUG=-debug ../../test_all.sh test_agent01.e
16
17ROOT=$(pwd)
18cd $(dirname $0)/..
19export LIBERTY_HOME=$(pwd)
20export INTERPRETER=${INTERPRETER:-libertyi}
21export LIBERTY_INTERPRETER=${LIBERTY_INTERPRETER:-$LIBERTY_HOME/target/bin/$INTERPRETER.d/$INTERPRETER}
22
23export LOG=${LOG:-error}
24export CHECK=${CHECK:-all}
25export DEBUG=${DEBUG:-}
26
27if [ x"$1" == x ]; then
28    find $ROOT -name test_\*.e -exec $LIBERTY_HOME/work/do_test.sh {} -log=$LOG -check=$CHECK $DEBUG \;
29else
30    while [ x"$1" != x ]; do
31	find $ROOT -name "$1" -exec $LIBERTY_HOME/work/do_test.sh {} -log=$LOG -check=$CHECK $DEBUG \;
32	shift
33    done
34fi