aboutsummaryrefslogtreecommitdiff
path: root/runtests.sh
diff options
context:
space:
mode:
authorMark Pulford <mark@kyne.com.au>2011-12-13 22:26:03 +1030
committerMark Pulford <mark@kyne.com.au>2011-12-13 22:26:03 +1030
commit9748b8b9865515a5d0c9087a7fa4587f1abe4e5b (patch)
tree7ad0f7475109f50c1459d0cff704d4f62a8fd4a8 /runtests.sh
parent85f693f3320aad53213cbb2166dab082ee1b58dd (diff)
downloadlua-cjson-9748b8b9865515a5d0c9087a7fa4587f1abe4e5b.tar.gz
lua-cjson-9748b8b9865515a5d0c9087a7fa4587f1abe4e5b.tar.bz2
lua-cjson-9748b8b9865515a5d0c9087a7fa4587f1abe4e5b.zip
Ensure build tests only use the current cjson.so
Update runtests.sh to exit if an old copy of cjson.so is found.
Diffstat (limited to 'runtests.sh')
-rwxr-xr-xruntests.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/runtests.sh b/runtests.sh
index 3876b45..45b1b8c 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -15,12 +15,6 @@ do_tests() {
15 cd .. 15 cd ..
16} 16}
17 17
18cat <<EOT
19Please ensure you do not have the Lua CJSON module installed before
20running these tests.
21
22EOT
23
24echo "===== Setting LuaRocks PATH =====" 18echo "===== Setting LuaRocks PATH ====="
25eval "`luarocks path`" 19eval "`luarocks path`"
26 20
@@ -31,6 +25,19 @@ echo "===== Cleaning old build data ====="
31make clean 25make clean
32rm -f tests/cjson.so 26rm -f tests/cjson.so
33 27
28echo "===== Verifying cjson.so is not installed ====="
29
30cd tests
31if lua -e 'require "cjson"' 2>/dev/null
32then
33 cat <<EOT
34Please ensure you do not have the Lua CJSON module installed before
35running these tests.
36EOT
37 exit
38fi
39cd ..
40
34echo "===== Testing LuaRocks build =====" 41echo "===== Testing LuaRocks build ====="
35luarocks make --local 42luarocks make --local
36do_tests 43do_tests