#!/bin/sh

# Run the asterisk testsuite. Should probably be run by root

# use --help to get the usage message of runtests.py. Without any
# options runs all tests. -l will list tests. -t can select one specific
# test.

out_dir="/var/lib/asterisk-testsuite"
results="$out_dir/asterisk-test-suite-report.xml"

cd /usr/share/asterisk-testsuite
./runtests.py -o "$out_dir" "$@"

# Now, check the results file

# list of failed tests:
#grep '<failure>Running' $results | sed -e "s|^.*'tests/|'tests/|" | cut -d"'" -f2 
# Summary:
#sed -n 2p $results
