diff options
| author | Mark Pulford <mark@kyne.com.au> | 2011-12-13 22:26:03 +1030 |
|---|---|---|
| committer | Mark Pulford <mark@kyne.com.au> | 2011-12-13 22:26:03 +1030 |
| commit | 9748b8b9865515a5d0c9087a7fa4587f1abe4e5b (patch) | |
| tree | 7ad0f7475109f50c1459d0cff704d4f62a8fd4a8 | |
| parent | 85f693f3320aad53213cbb2166dab082ee1b58dd (diff) | |
| download | lua-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.
| -rwxr-xr-x | runtests.sh | 19 |
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 | ||
| 18 | cat <<EOT | ||
| 19 | Please ensure you do not have the Lua CJSON module installed before | ||
| 20 | running these tests. | ||
| 21 | |||
| 22 | EOT | ||
| 23 | |||
| 24 | echo "===== Setting LuaRocks PATH =====" | 18 | echo "===== Setting LuaRocks PATH =====" |
| 25 | eval "`luarocks path`" | 19 | eval "`luarocks path`" |
| 26 | 20 | ||
| @@ -31,6 +25,19 @@ echo "===== Cleaning old build data =====" | |||
| 31 | make clean | 25 | make clean |
| 32 | rm -f tests/cjson.so | 26 | rm -f tests/cjson.so |
| 33 | 27 | ||
| 28 | echo "===== Verifying cjson.so is not installed =====" | ||
| 29 | |||
| 30 | cd tests | ||
| 31 | if lua -e 'require "cjson"' 2>/dev/null | ||
| 32 | then | ||
| 33 | cat <<EOT | ||
| 34 | Please ensure you do not have the Lua CJSON module installed before | ||
| 35 | running these tests. | ||
| 36 | EOT | ||
| 37 | exit | ||
| 38 | fi | ||
| 39 | cd .. | ||
| 40 | |||
| 34 | echo "===== Testing LuaRocks build =====" | 41 | echo "===== Testing LuaRocks build =====" |
| 35 | luarocks make --local | 42 | luarocks make --local |
| 36 | do_tests | 43 | do_tests |
