2015-11-24 13:36:46 -08:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2015-12-21 23:49:17 -08:00
|
|
|
# Execute all of the automated tests related to Zcash.
|
2015-11-24 13:36:46 -08:00
|
|
|
#
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
SUITE_EXIT_STATUS=0
|
|
|
|
REPOROOT="$(readlink -f "$(dirname "$0")"/../../)"
|
|
|
|
|
|
|
|
function run_test_phase
|
|
|
|
{
|
|
|
|
echo "===== BEGIN: $*"
|
|
|
|
set +e
|
|
|
|
eval "$@"
|
|
|
|
if [ $? -eq 0 ]
|
|
|
|
then
|
|
|
|
echo "===== PASSED: $*"
|
|
|
|
else
|
|
|
|
echo "===== FAILED: $*"
|
|
|
|
SUITE_EXIT_STATUS=1
|
|
|
|
fi
|
|
|
|
set -e
|
|
|
|
}
|
|
|
|
|
|
|
|
cd "${REPOROOT}"
|
|
|
|
|
|
|
|
# Test phases:
|
2016-07-05 15:37:21 -07:00
|
|
|
run_test_phase "${REPOROOT}/qa/zcash/check-security-hardening.sh"
|
2016-02-03 12:57:34 -08:00
|
|
|
run_test_phase "${REPOROOT}/qa/zcash/ensure-no-dot-so-in-depends.py"
|
2015-12-21 19:23:29 -08:00
|
|
|
|
|
|
|
# If make check fails, show test-suite.log as part of our run_test_phase
|
|
|
|
# output (and fail the phase with false):
|
|
|
|
run_test_phase make check '||' \
|
|
|
|
'{' \
|
|
|
|
echo '=== ./src/test-suite.log ===' ';' \
|
|
|
|
cat './src/test-suite.log' ';' \
|
|
|
|
false ';' \
|
|
|
|
'}'
|
2015-11-24 13:36:46 -08:00
|
|
|
|
|
|
|
exit $SUITE_EXIT_STATUS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|