diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2014-03-21 19:33:47 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2014-03-21 19:33:47 -0300 |
| commit | 00b5631f71fcb0db535aded042b51aa58223e6a4 (patch) | |
| tree | 25ce0874e7f413e9c4afd501eb0e5b287b583686 | |
| parent | 33eb3546bf94dd88fef3a1646fa02d499b98dca8 (diff) | |
| download | luarocks-00b5631f71fcb0db535aded042b51aa58223e6a4.tar.gz luarocks-00b5631f71fcb0db535aded042b51aa58223e6a4.tar.bz2 luarocks-00b5631f71fcb0db535aded042b51aa58223e6a4.zip | |
Run Travis-CI testsuite on Lua 5.1 and Lua 5.2!
| -rw-r--r-- | .travis.yml | 2 | ||||
| -rwxr-xr-x | test/testing.sh | 44 |
2 files changed, 28 insertions, 18 deletions
diff --git a/.travis.yml b/.travis.yml index dced928c..76fdf6d1 100644 --- a/.travis.yml +++ b/.travis.yml | |||
| @@ -1,3 +1,3 @@ | |||
| 1 | language: c | 1 | language: c |
| 2 | compiler: gcc | 2 | compiler: gcc |
| 3 | script: cd test && ./testing.sh --travis | 3 | script: cd test && ./testing.sh --travis --lua 5.2.3 && ./testing.sh --travis --lua 5.1.5 |
diff --git a/test/testing.sh b/test/testing.sh index 409620c0..e3aee55f 100755 --- a/test/testing.sh +++ b/test/testing.sh | |||
| @@ -21,14 +21,31 @@ then | |||
| 21 | shift | 21 | shift |
| 22 | fi | 22 | fi |
| 23 | 23 | ||
| 24 | luaversion=5.1.5 | ||
| 25 | |||
| 26 | if [ "$1" == "--lua" ] | ||
| 27 | then | ||
| 28 | shift | ||
| 29 | luaversion=$1 | ||
| 30 | shift | ||
| 31 | fi | ||
| 32 | |||
| 24 | testing_dir="$PWD" | 33 | testing_dir="$PWD" |
| 25 | 34 | ||
| 26 | testing_tree="$testing_dir/testing" | 35 | testing_tree="$testing_dir/testing-$luaversion" |
| 27 | testing_sys_tree="$testing_dir/testing_sys" | 36 | testing_sys_tree="$testing_dir/testing_sys-$luaversion" |
| 28 | testing_tree_copy="$testing_dir/testing_copy" | 37 | testing_tree_copy="$testing_dir/testing_copy-$luaversion" |
| 29 | testing_sys_tree_copy="$testing_dir/testing_sys_copy" | 38 | testing_sys_tree_copy="$testing_dir/testing_sys_copy-$luaversion" |
| 30 | testing_cache="$testing_dir/testing_cache" | 39 | testing_cache="$testing_dir/testing_cache-$luaversion" |
| 31 | testing_server="$testing_dir/testing_server" | 40 | testing_server="$testing_dir/testing_server-$luaversion" |
| 41 | |||
| 42 | |||
| 43 | if [ "$1" == "--clean" ] | ||
| 44 | then | ||
| 45 | shift | ||
| 46 | rm -rf "$testing_cache" | ||
| 47 | rm -rf "$testing_server" | ||
| 48 | fi | ||
| 32 | 49 | ||
| 33 | [ "$1" ] || rm -f luacov.stats.out | 50 | [ "$1" ] || rm -f luacov.stats.out |
| 34 | rm -f luacov.report.out | 51 | rm -f luacov.report.out |
| @@ -43,12 +60,6 @@ rm -rf "$testing_dir/testing_config_show_downloads.lua" | |||
| 43 | rm -rf "$testing_dir/testing_config_sftp.lua" | 60 | rm -rf "$testing_dir/testing_config_sftp.lua" |
| 44 | rm -rf "$testing_dir/luacov.config" | 61 | rm -rf "$testing_dir/luacov.config" |
| 45 | 62 | ||
| 46 | if [ "$1" == "--clean" ] | ||
| 47 | then | ||
| 48 | rm -rf "$testing_cache" | ||
| 49 | rm -rf "$testing_server" | ||
| 50 | fi | ||
| 51 | |||
| 52 | mkdir -p "$testing_cache" | 63 | mkdir -p "$testing_cache" |
| 53 | 64 | ||
| 54 | [ "$1" = "clean" ] && { | 65 | [ "$1" = "clean" ] && { |
| @@ -126,11 +137,11 @@ export LUAROCKS_CONFIG="$testing_dir/testing_config.lua" | |||
| 126 | export LUA_PATH= | 137 | export LUA_PATH= |
| 127 | export LUA_CPATH= | 138 | export LUA_CPATH= |
| 128 | 139 | ||
| 129 | luaversion=5.2.3 | ||
| 130 | if [ "$travis" ] | 140 | if [ "$travis" ] |
| 131 | then | 141 | then |
| 142 | luadir=/tmp/lua-$luaversion | ||
| 132 | pushd /tmp | 143 | pushd /tmp |
| 133 | if [ ! -e "lua/bin/lua" ] | 144 | if [ ! -e "$luadir/bin/lua" ] |
| 134 | then | 145 | then |
| 135 | mkdir -p lua | 146 | mkdir -p lua |
| 136 | echo "Downloading lua $luaversion..." | 147 | echo "Downloading lua $luaversion..." |
| @@ -138,11 +149,10 @@ then | |||
| 138 | tar zxpf "lua-$luaversion.tar.gz" | 149 | tar zxpf "lua-$luaversion.tar.gz" |
| 139 | cd "lua-$luaversion" | 150 | cd "lua-$luaversion" |
| 140 | echo "Building lua $luaversion..." | 151 | echo "Building lua $luaversion..." |
| 141 | make linux INSTALL_TOP=/tmp/lua &> /dev/null | 152 | make linux INSTALL_TOP="$luadir" &> /dev/null |
| 142 | make install INSTALL_TOP=/tmp/lua &> /dev/null | 153 | make install INSTALL_TOP="$luadir" &> /dev/null |
| 143 | fi | 154 | fi |
| 144 | popd | 155 | popd |
| 145 | luadir=/tmp/lua | ||
| 146 | else | 156 | else |
| 147 | luadir="/Programs/Lua/Current" | 157 | luadir="/Programs/Lua/Current" |
| 148 | fi | 158 | fi |
