#!/bin/bash

MINCOVERAGE=92
SCRIPTPATH=$(readlink -f "$0")
TESTDIR=`dirname $SCRIPTPATH`
BASEDIR=`readlink -f $TESTDIR/..`
cd $BASEDIR || exit 1

TESTCMD="PYTHONPATH=$BASEDIR coverage run --parallel-mode --source $BASEDIR/faucet"
SRCFILES="find $TESTDIR/unit/*/test_*py $TESTDIR/integration/experimental_api_test_app.py -type f"

coverage erase || exit 1
$SRCFILES | xargs realpath | shuf | parallel --timeout 120 --delay 1 --bar --halt now,fail=1 -j 2 $TESTCMD || exit 1
coverage combine
coverage report -m --fail-under=$MINCOVERAGE || exit 1

#!/bin/bash

MINCOVERAGE=92
SCRIPTPATH=$(readlink -f "$0")
TESTDIR=`dirname $SCRIPTPATH`
BASEDIR=`readlink -f $TESTDIR/..`
cd $BASEDIR || exit 1

TESTCMD="PYTHONPATH=$BASEDIR coverage run --parallel-mode --source $BASEDIR/faucet"
SRCFILES="find $TESTDIR/unit/*/test_*py $TESTDIR/integration/experimental_api_test_app.py -type f"

coverage erase || exit 1
$SRCFILES | xargs realpath | shuf | parallel --timeout 300 --delay 1 --bar --halt now,fail=1 -j 2 $TESTCMD || exit 1
coverage combine
coverage report -m --fail-under=$MINCOVERAGE || exit 1

Increase timeout so unit tests can run on machines with less CPU.
Increase timeout so unit tests can run on machines with less CPU.
