2016-06-16 19:34:25 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# `SECRET_PROJECT_ROOT` must be set before running the script.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2018-06-30 20:33:07 +00:00
|
|
|
# Running all the bats-tests in a dir with spaces:
|
|
|
|
cd "${SECRET_PROJECT_ROOT}"; rm -rf 'tempdir with spaces'; mkdir 'tempdir with spaces'; cd 'tempdir with spaces';
|
2018-07-14 19:23:39 +00:00
|
|
|
|
2018-08-25 14:05:17 +00:00
|
|
|
export SECRETS_DIR=.gitsecret
|
|
|
|
|
2018-07-14 23:28:05 +00:00
|
|
|
# bats expects diagnostic lines to be sent to fd 3, matching reges '^ #' (IE, like: `echo '# message here' >&3`)
|
|
|
|
# bats ... 3>&1 shows diagnostic output when errors occur.
|
2018-08-25 14:05:17 +00:00
|
|
|
bats "${SECRET_PROJECT_ROOT}/tests/" 3>&1
|