aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2013-12-09 14:17:58 -0200
committerHisham Muhammad <hisham@gobolinux.org>2013-12-09 14:17:58 -0200
commit50332f6b2196065da1e262d2e0ef56ec40535300 (patch)
tree84490bfcd29d4a91feaf1f7b7009c1fa02224133 /test
parentaafefa8e1c37f5eb9ccb319c667d5094223e3f9f (diff)
downloadluarocks-50332f6b2196065da1e262d2e0ef56ec40535300.tar.gz
luarocks-50332f6b2196065da1e262d2e0ef56ec40535300.tar.bz2
luarocks-50332f6b2196065da1e262d2e0ef56ec40535300.zip
Fixes for Travis-CI
Diffstat (limited to 'test')
-rwxr-xr-xtest/testing.sh36
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 }
16fi 16fi
17 17
18if [ "$1" == "--travis" ]
19then
20 travis=true
21 shift
22fi
23
18testing_dir="$PWD" 24testing_dir="$PWD"
19 25
20testing_tree="$testing_dir/testing" 26testing_tree="$testing_dir/testing"
@@ -97,15 +103,31 @@ export LUAROCKS_CONFIG="$testing_dir/testing_config.lua"
97export LUA_PATH= 103export LUA_PATH=
98export LUA_CPATH= 104export LUA_CPATH=
99 105
100luadir="/Programs/Lua/Current" 106luaversion=5.2.3
107if [ "$travis" ]
108then
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
118else
119 luadir="/Programs/Lua/Current"
120fi
101platform="linux-x86" 121platform="linux-x86"
102lua="$luadir/bin/lua" 122lua="$luadir/bin/lua"
103 123
124version_luasocket=3.0rc1
125verrev_luasocket=${version_luasocket}-1
126srcdir_luasocket=luasocket-3.0-rc1
127
104version_luacov=0.3 128version_luacov=0.3
105version_luasocket=2.0.2
106version_lxsh=0.8.6 129version_lxsh=0.8.6
107version_validate_args=1.5.4 130version_validate_args=1.5.4
108verrev_luasocket=${version_luasocket}-5
109verrev_lxsh=${version_lxsh}-2 131verrev_lxsh=${version_lxsh}-2
110 132
111cd .. 133cd ..
@@ -200,14 +222,16 @@ test_lint_ok() { $luarocks download --rockspec validate-args ${version_validate_
200test_list() { $luarocks list; } 222test_list() { $luarocks list; }
201test_list_porcelain() { $luarocks list --porcelain; } 223test_list_porcelain() { $luarocks list --porcelain; }
202 224
203test_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}; } 225test_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}; }
226test_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}; }
204test_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}; } 227test_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}; }
228fail_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
206test_new_version() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec 0.2 && rm ./luacov-0.*; } 230test_new_version() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec 0.2 && rm ./luacov-0.*; }
207test_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-*; } 231test_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
209test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; } 233test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; }
210test_pack_src() { $luarocks download --rockspec luasocket && $luarocks pack ./luasocket-${verrev_luasocket}.rockspec && rm ./luasocket-${version_luasocket}-*.rock; } 234test_pack_src() { $luarocks install luasec && $luarocks download --rockspec luasocket && $luarocks pack ./luasocket-${verrev_luasocket}.rockspec && rm ./luasocket-${version_luasocket}-*.rock; }
211 235
212test_path() { $luarocks path --bin; } 236test_path() { $luarocks path --bin; }
213 237
@@ -234,7 +258,7 @@ test_admin_help() { $luarocks_admin help; }
234 258
235test_admin_make_manifest() { $luarocks_admin make_manifest; } 259test_admin_make_manifest() { $luarocks_admin make_manifest; }
236test_admin_add_rsync() { $luarocks_admin --server=testing add ./luasocket-${verrev_luasocket}.src.rock; } 260test_admin_add_rsync() { $luarocks_admin --server=testing add ./luasocket-${verrev_luasocket}.src.rock; }
237test_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"; } 261test_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"; }
238fail_admin_add_missing() { $luarocks_admin --server=testing add; } 262fail_admin_add_missing() { $luarocks_admin --server=testing add; }
239fail_admin_invalidserver() { $luarocks_admin --server=invalid add ./luasocket-${verrev_luasocket}.src.rock; } 263fail_admin_invalidserver() { $luarocks_admin --server=invalid add ./luasocket-${verrev_luasocket}.src.rock; }
240fail_admin_invalidrock() { $luarocks_admin --server=testing add invalid; } 264fail_admin_invalidrock() { $luarocks_admin --server=testing add invalid; }