summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTimothy J. Wood <tjw@omnigroup.com>2009-02-25 12:06:15 -0800
committerTimothy J. Wood <tjw@omnigroup.com>2009-02-25 12:06:15 -0800
commit2c95333597e200e724b7182753354864b46af586 (patch)
tree6b162d61d91665d2df17e0554605249e49fd435f /test
parent550f66d7bc1d58a2344c47300c80d8b477dbb9a0 (diff)
downloadyajl-2c95333597e200e724b7182753354864b46af586.tar.gz
Allow the caller to specify a test binary to use.
This is useful for integrating with non-cmake build systems such as Xcode.
Diffstat (limited to 'test')
-rwxr-xr-xtest/run_tests.sh19
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"