Fix issue with PATH causing test failures
I was seeing an issue where modifying PATH caused the Ruby plugin tests to fail. I fixed that and while digging around fixed an issue that would cause the tests to behave weirdly if run from any other location. This solves one of the issues noted in #687, but I haven't tried running the new tests from that PR with these changes.pull/694/head
parent
ae179df0c2
commit
3eb35f6054
9
test/run
9
test/run
|
|
@ -1,6 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
PATH=$PATH:$(pwd)/bats/bin
|
_TEST_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
set +e
|
_BATS="${_TEST_DIR}/../bats/bin/bats"
|
||||||
[[ -z "$(which bats)" ]] && git clone --depth 1 https://github.com/sstephenson/bats.git
|
[ ! -e $_BATS ] && git clone --depth 1 https://github.com/sstephenson/bats.git ${_TEST_DIR}/../bats
|
||||||
set -e
|
exec $_BATS ${CI:+--tap} ${_TEST_DIR}/{lib,plugins}
|
||||||
exec bats ${CI:+--tap} test/{lib,plugins}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue