diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2013-12-09 14:17:58 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2013-12-09 14:17:58 -0200 |
commit | 50332f6b2196065da1e262d2e0ef56ec40535300 (patch) | |
tree | 84490bfcd29d4a91feaf1f7b7009c1fa02224133 /test | |
parent | aafefa8e1c37f5eb9ccb319c667d5094223e3f9f (diff) | |
download | luarocks-50332f6b2196065da1e262d2e0ef56ec40535300.tar.gz luarocks-50332f6b2196065da1e262d2e0ef56ec40535300.tar.bz2 luarocks-50332f6b2196065da1e262d2e0ef56ec40535300.zip |
Fixes for Travis-CI
Diffstat (limited to 'test')
-rwxr-xr-x | test/testing.sh | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/test/testing.sh b/test/testing.sh index 6b8be3ab..8e29ef61 100755 --- a/test/testing.sh +++ b/test/testing.sh | |||
@@ -15,6 +15,12 @@ then | |||
15 | } | 15 | } |
16 | fi | 16 | fi |
17 | 17 | ||
18 | if [ "$1" == "--travis" ] | ||
19 | then | ||
20 | travis=true | ||
21 | shift | ||
22 | fi | ||
23 | |||
18 | testing_dir="$PWD" | 24 | testing_dir="$PWD" |
19 | 25 | ||
20 | testing_tree="$testing_dir/testing" | 26 | testing_tree="$testing_dir/testing" |
@@ -97,15 +103,31 @@ export LUAROCKS_CONFIG="$testing_dir/testing_config.lua" | |||
97 | export LUA_PATH= | 103 | export LUA_PATH= |
98 | export LUA_CPATH= | 104 | export LUA_CPATH= |
99 | 105 | ||
100 | luadir="/Programs/Lua/Current" | 106 | luaversion=5.2.3 |
107 | if [ "$travis" ] | ||
108 | then | ||
109 | pushd /tmp | ||
110 | mkdir -p lua | ||
111 | wget "http://www.lua.org/ftp/lua-$luaversion.tar.gz" | ||
112 | tar zxvpf "lua-$luaversion.tar.gz" | ||
113 | cd "lua-$luaversion" | ||
114 | make linux INSTALL_TOP=/tmp/lua | ||
115 | make install INSTALL_TOP=/tmp/lua | ||
116 | popd | ||
117 | luadir=/tmp/lua | ||
118 | else | ||
119 | luadir="/Programs/Lua/Current" | ||
120 | fi | ||
101 | platform="linux-x86" | 121 | platform="linux-x86" |
102 | lua="$luadir/bin/lua" | 122 | lua="$luadir/bin/lua" |
103 | 123 | ||
124 | version_luasocket=3.0rc1 | ||
125 | verrev_luasocket=${version_luasocket}-1 | ||
126 | srcdir_luasocket=luasocket-3.0-rc1 | ||
127 | |||
104 | version_luacov=0.3 | 128 | version_luacov=0.3 |
105 | version_luasocket=2.0.2 | ||
106 | version_lxsh=0.8.6 | 129 | version_lxsh=0.8.6 |
107 | version_validate_args=1.5.4 | 130 | version_validate_args=1.5.4 |
108 | verrev_luasocket=${version_luasocket}-5 | ||
109 | verrev_lxsh=${version_lxsh}-2 | 131 | verrev_lxsh=${version_lxsh}-2 |
110 | 132 | ||
111 | cd .. | 133 | cd .. |
@@ -200,14 +222,16 @@ test_lint_ok() { $luarocks download --rockspec validate-args ${version_validate_ | |||
200 | test_list() { $luarocks list; } | 222 | test_list() { $luarocks list; } |
201 | test_list_porcelain() { $luarocks list --porcelain; } | 223 | test_list_porcelain() { $luarocks list --porcelain; } |
202 | 224 | ||
203 | test_make() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks download --src luasocket && $luarocks unpack ./luasocket-${verrev_luasocket}.src.rock && cd luasocket-${verrev_luasocket}/luasocket-${version_luasocket} && $luarocks make && cd ../.. && rm -rf ./luasocket-${verrev_luasocket}; } | 225 | test_make_with_rockspec() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks download --src luasocket && $luarocks unpack ./luasocket-${verrev_luasocket}.src.rock && cd luasocket-${verrev_luasocket}/${srcdir_luasocket} && $luarocks make luasocket-${verrev_luasocket}.rockspec && cd ../.. && rm -rf ./luasocket-${verrev_luasocket}; } |
226 | test_make_default_rockspec() { rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --src lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && $luarocks make && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; } | ||
204 | test_make_pack_binary_rock() { rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --src lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && $luarocks make --deps-mode=none --pack-binary-rock && [ -e ./lxsh-${verrev_lxsh}.all.rock ] && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; } | 227 | test_make_pack_binary_rock() { rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --src lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && $luarocks make --deps-mode=none --pack-binary-rock && [ -e ./lxsh-${verrev_lxsh}.all.rock ] && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; } |
228 | fail_make_which_rockspec() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks download --src luasocket && $luarocks unpack ./luasocket-${verrev_luasocket}.src.rock && cd luasocket-${verrev_luasocket}/${srcdir_luasocket} && $luarocks make && cd ../.. && rm -rf ./luasocket-${verrev_luasocket}; } | ||
205 | 229 | ||
206 | test_new_version() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec 0.2 && rm ./luacov-0.*; } | 230 | test_new_version() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec 0.2 && rm ./luacov-0.*; } |
207 | test_new_version_url() { $luarocks download --rockspec abelhas 1.0 && $luarocks new_version ./abelhas-1.0-1.rockspec 1.1 https://github.com/downloads/ittner/abelhas/abelhas-1.1.tar.gz && rm ./abelhas-*; } | 231 | test_new_version_url() { $luarocks download --rockspec abelhas 1.0 && $luarocks new_version ./abelhas-1.0-1.rockspec 1.1 https://github.com/downloads/ittner/abelhas/abelhas-1.1.tar.gz && rm ./abelhas-*; } |
208 | 232 | ||
209 | test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; } | 233 | test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; } |
210 | test_pack_src() { $luarocks download --rockspec luasocket && $luarocks pack ./luasocket-${verrev_luasocket}.rockspec && rm ./luasocket-${version_luasocket}-*.rock; } | 234 | test_pack_src() { $luarocks install luasec && $luarocks download --rockspec luasocket && $luarocks pack ./luasocket-${verrev_luasocket}.rockspec && rm ./luasocket-${version_luasocket}-*.rock; } |
211 | 235 | ||
212 | test_path() { $luarocks path --bin; } | 236 | test_path() { $luarocks path --bin; } |
213 | 237 | ||
@@ -234,7 +258,7 @@ test_admin_help() { $luarocks_admin help; } | |||
234 | 258 | ||
235 | test_admin_make_manifest() { $luarocks_admin make_manifest; } | 259 | test_admin_make_manifest() { $luarocks_admin make_manifest; } |
236 | test_admin_add_rsync() { $luarocks_admin --server=testing add ./luasocket-${verrev_luasocket}.src.rock; } | 260 | test_admin_add_rsync() { $luarocks_admin --server=testing add ./luasocket-${verrev_luasocket}.src.rock; } |
237 | test_admin_add_sftp() { export LUAROCKS_CONFIG="$testing_dir/testing_config_sftp.lua" && $luarocks_admin --server=testing add ./luasocket-${verrev_luasocket}.src.rock; export LUAROCKS_CONFIG="$testing_dir/testing_config.lua"; } | 261 | test_admin_add_sftp() { if [ "$travis" ]; then return; fi; export LUAROCKS_CONFIG="$testing_dir/testing_config_sftp.lua" && $luarocks_admin --server=testing add ./luasocket-${verrev_luasocket}.src.rock; export LUAROCKS_CONFIG="$testing_dir/testing_config.lua"; } |
238 | fail_admin_add_missing() { $luarocks_admin --server=testing add; } | 262 | fail_admin_add_missing() { $luarocks_admin --server=testing add; } |
239 | fail_admin_invalidserver() { $luarocks_admin --server=invalid add ./luasocket-${verrev_luasocket}.src.rock; } | 263 | fail_admin_invalidserver() { $luarocks_admin --server=invalid add ./luasocket-${verrev_luasocket}.src.rock; } |
240 | fail_admin_invalidrock() { $luarocks_admin --server=testing add invalid; } | 264 | fail_admin_invalidrock() { $luarocks_admin --server=testing add invalid; } |