diff options
-rwxr-xr-x | test/run_tests.sh | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/test/run_tests.sh b/test/run_tests.sh index ac6868b..174932f 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -5,14 +5,17 @@ if [[ `uname` == *W32* ]] ; then DIFF_FLAGS="-wu" fi -# find test binary on both platforms -testBin="../build/test/Debug/yajl_test.exe" -if [[ ! -x $testBin ]] ; then - testBin="../build/test/yajl_test" - if [[ ! -x $testBin ]] ; then - echo "cannot execute test binary: '$testBin'" - exit 1; - fi +# find test binary on both platforms. allow the caller to force a +# particular test binary (useful for non-cmake build systems). +if [ -z "$testBin" ]; then + testBin="../build/test/Debug/yajl_test.exe" + if [[ ! -x $testBin ]] ; then + testBin="../build/test/yajl_test" + if [[ ! -x $testBin ]] ; then + echo "cannot execute test binary: '$testBin'" + exit 1; + fi + fi fi echo "using test binary: $testBin" |