aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2013-09-20 22:48:41 -0300
committerHisham Muhammad <hisham@gobolinux.org>2013-09-20 22:48:41 -0300
commit2e999a15fa6de929cf7640054554844d27a20174 (patch)
tree29842b12ddef9ff69c0b33ccdab1a5224ddbe037
parent24ce781bba623684f244e78adef79c812c080b4a (diff)
downloadluarocks-2e999a15fa6de929cf7640054554844d27a20174.tar.gz
luarocks-2e999a15fa6de929cf7640054554844d27a20174.tar.bz2
luarocks-2e999a15fa6de929cf7640054554844d27a20174.zip
Fix regressions in test suite
-rwxr-xr-xtest/testing.sh51
1 files changed, 29 insertions, 22 deletions
diff --git a/test/testing.sh b/test/testing.sh
index 7a62c0e5..207bdfbc 100755
--- a/test/testing.sh
+++ b/test/testing.sh
@@ -77,8 +77,16 @@ export LUA_PATH=
77export LUA_CPATH= 77export LUA_CPATH=
78 78
79luadir="/Programs/Lua/Current" 79luadir="/Programs/Lua/Current"
80platform="linux-x86"
80lua="$luadir/bin/lua" 81lua="$luadir/bin/lua"
81 82
83version_luacov=0.3
84version_luasocket=2.0.2
85version_lxsh=0.8.6
86version_validate_args=1.5.4
87verrev_luasocket=${version_luasocket}-5
88verrev_lxsh=${version_lxsh}-2
89
82cd .. 90cd ..
83./configure --with-lua="$luadir" 91./configure --with-lua="$luadir"
84make clean 92make clean
@@ -88,7 +96,6 @@ cd src
88 96
89echo $LUA_PATH 97echo $LUA_PATH
90 98
91luacov_version=0.3
92luarocks_nocov="$lua $PWD/bin/luarocks" 99luarocks_nocov="$lua $PWD/bin/luarocks"
93luarocks="$lua -erequire('luacov.runner')('$testing_dir/luacov.config') $PWD/bin/luarocks" 100luarocks="$lua -erequire('luacov.runner')('$testing_dir/luacov.config') $PWD/bin/luarocks"
94luarocks_admin="$lua -erequire('luacov.runner')('$testing_dir/luacov.config') $PWD/bin/luarocks-admin" 101luarocks_admin="$lua -erequire('luacov.runner')('$testing_dir/luacov.config') $PWD/bin/luarocks-admin"
@@ -148,40 +155,40 @@ fail_make_norockspec() { $luarocks make; }
148 155
149fail_build_blank_arg() { $luarocks build --tree="" lpeg; } 156fail_build_blank_arg() { $luarocks build --tree="" lpeg; }
150test_build_withpatch() { $luarocks build luadoc; } 157test_build_withpatch() { $luarocks build luadoc; }
151test_build_diffversion() { $luarocks build luacov $luacov_version; } 158test_build_diffversion() { $luarocks build luacov ${version_luacov}; }
152test_build_command() { $luarocks build stdlib; } 159test_build_command() { $luarocks build stdlib; }
153test_build_install_bin() { $luarocks build luarepl; } 160test_build_install_bin() { $luarocks build luarepl; }
154fail_build_nohttps() { $luarocks install luasocket && $luarocks download --rockspec validate-args 1.5.4 && $luarocks build ./validate-args-1.5.4-1.rockspec && rm ./validate-args-1.5.4-1.rockspec; } 161fail_build_nohttps() { $luarocks install luasocket && $luarocks download --rockspec validate-args ${version_validate_args} && $luarocks build ./validate-args-${version_validate_args}-1.rockspec && rm ./validate-args-${version_validate_args}-1.rockspec; }
155test_build_https() { $luarocks download --rockspec validate-args 1.5.4 && $luarocks install luasec && $luarocks build ./validate-args-1.5.4-1.rockspec && rm ./validate-args-1.5.4-1.rockspec; } 162test_build_https() { $luarocks download --rockspec validate-args ${version_validate_args} && $luarocks install luasec && $luarocks build ./validate-args-${version_validate_args}-1.rockspec && rm ./validate-args-${version_validate_args}-1.rockspec; }
156test_build_supported_platforms() { $luarocks build xctrl; } 163test_build_supported_platforms() { $luarocks build xctrl; }
157 164
158test_download_all() { $luarocks download --all validate-args && rm validate-args-*; } 165test_download_all() { $luarocks download --all validate-args && rm validate-args-*; }
159test_download_rockspecversion() { $luarocks download --rockspec validate-args 1.5.4 && rm validate-args-*; } 166test_download_rockspecversion() { $luarocks download --rockspec validate-args ${version_validate_args} && rm validate-args-*; }
160 167
161test_help() { $luarocks help; } 168test_help() { $luarocks help; }
162 169
163test_install_binaryrock() { $luarocks build luasocket && $luarocks pack luasocket && $luarocks install ./luasocket-2.0.2-5.linux-x86.rock && rm ./luasocket-2.0.2-5.linux-x86.rock; } 170test_install_binaryrock() { $luarocks build luasocket && $luarocks pack luasocket && $luarocks install ./luasocket-${verrev_luasocket}.${platform}.rock && rm ./luasocket-${verrev_luasocket}.${platform}.rock; }
164test_install_with_bin() { $luarocks install wsapi; } 171test_install_with_bin() { $luarocks install wsapi; }
165 172
166test_lint_ok() { $luarocks download --rockspec validate-args 1.5.4 && $luarocks lint ./validate-args-1.5.4-1.rockspec && rm ./validate-args-1.5.4-1.rockspec; } 173test_lint_ok() { $luarocks download --rockspec validate-args ${version_validate_args} && $luarocks lint ./validate-args-${version_validate_args}-1.rockspec && rm ./validate-args-${version_validate_args}-1.rockspec; }
167 174
168test_list() { $luarocks list; } 175test_list() { $luarocks list; }
169test_list_porcelain() { $luarocks list --porcelain; } 176test_list_porcelain() { $luarocks list --porcelain; }
170 177
171test_make() { rm -rf ./luasocket-2.0.2-5 && $luarocks download --src luasocket && $luarocks unpack ./luasocket-2.0.2-5.src.rock && cd luasocket-2.0.2-5/luasocket-2.0.2 && $luarocks make && cd ../.. && rm -rf ./luasocket-2.0.2-5; } 178test_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}; }
172test_make_pack_binary_rock() { rm -rf ./lxsh-0.8.6-1 && $luarocks download --src lxsh 0.8.6-1 && $luarocks unpack ./lxsh-0.8.6-1.src.rock && cd lxsh-0.8.6-1/lxsh-0.8.6-1 && $luarocks make --deps-mode=none --pack-binary-rock && [ -e ./lxsh-0.8.6-1.all.rock ] && cd ../.. && rm -rf ./lxsh-0.8.6-1; } 179test_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}; }
173 180
174test_new_version() { $luarocks download --rockspec luacov $luacov_version && $luarocks new_version ./luacov-$luacov_version-1.rockspec 0.2 && rm ./luacov-0.*; } 181test_new_version() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec 0.2 && rm ./luacov-0.*; }
175 182
176test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; } 183test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; }
177test_pack_src() { $luarocks download --rockspec luasocket && $luarocks pack ./luasocket-2.0.2-5.rockspec && rm ./luasocket-2.0.2-*.rock; } 184test_pack_src() { $luarocks download --rockspec luasocket && $luarocks pack ./luasocket-${verrev_luasocket}.rockspec && rm ./luasocket-${version_luasocket}-*.rock; }
178 185
179test_path() { $luarocks path --bin; } 186test_path() { $luarocks path --bin; }
180 187
181fail_purge_missing_tree() { $luarocks purge --tree="$testing_tree"; } 188fail_purge_missing_tree() { $luarocks purge --tree="$testing_tree"; }
182test_purge() { $luarocks purge --tree="$testing_sys_tree"; } 189test_purge() { $luarocks purge --tree="$testing_sys_tree"; }
183 190
184test_remove() { $luarocks build luacov $luacov_version && $luarocks remove luacov $luacov_version; } 191test_remove() { $luarocks build luacov ${version_luacov} && $luarocks remove luacov ${version_luacov}; }
185#fail_remove_deps() { $luarocks build luadoc && $luarocks remove luasocket; } 192#fail_remove_deps() { $luarocks build luadoc && $luarocks remove luasocket; }
186 193
187test_search_found() { $luarocks search zlib; } 194test_search_found() { $luarocks search zlib; }
@@ -190,20 +197,20 @@ test_search_missing() { $luarocks search missing_rock; }
190test_show() { $luarocks show luacov; } 197test_show() { $luarocks show luacov; }
191test_show_modules() { $luarocks show --modules luacov; } 198test_show_modules() { $luarocks show --modules luacov; }
192test_show_depends() { $luarocks install luasec && $luarocks show luasec; } 199test_show_depends() { $luarocks install luasec && $luarocks show luasec; }
193test_show_oldversion() { $luarocks install luacov $luacov_version && $luarocks show luacov $luacov_version; } 200test_show_oldversion() { $luarocks install luacov ${version_luacov} && $luarocks show luacov ${version_luacov}; }
194 201
195test_unpack_download() { rm -rf ./luasocket-2.0.2-5 && $luarocks unpack luasocket && rm -rf ./luasocket-2.0.2-5; } 202test_unpack_download() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks unpack luasocket && rm -rf ./luasocket-${verrev_luasocket}; }
196test_unpack_src() { rm -rf ./luasocket-2.0.2-5 && $luarocks download --src luasocket && $luarocks unpack ./luasocket-2.0.2-5.src.rock && rm -rf ./luasocket-2.0.2-5; } 203test_unpack_src() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks download --src luasocket && $luarocks unpack ./luasocket-${verrev_luasocket}.src.rock && rm -rf ./luasocket-${verrev_luasocket}; }
197test_unpack_rockspec() { rm -rf ./luasocket-2.0.2-5 && $luarocks download --rockspec luasocket && $luarocks unpack ./luasocket-2.0.2-5.rockspec && rm -rf ./luasocket-2.0.2-5; } 204test_unpack_rockspec() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks download --rockspec luasocket && $luarocks unpack ./luasocket-${verrev_luasocket}.rockspec && rm -rf ./luasocket-${verrev_luasocket}; }
198test_unpack_binary() { rm -rf ./luasocket-2.0.2-5 && $luarocks build luasocket && $luarocks pack luasocket && $luarocks unpack ./luasocket-2.0.2-5.linux-x86.rock && rm -rf ./luasocket-2.0.2-5; } 205test_unpack_binary() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks build luasocket && $luarocks pack luasocket && $luarocks unpack ./luasocket-${verrev_luasocket}.${platform}.rock && rm -rf ./luasocket-${verrev_luasocket}; }
199 206
200test_admin_help() { $luarocks_admin help; } 207test_admin_help() { $luarocks_admin help; }
201 208
202test_admin_make_manifest() { $luarocks_admin make_manifest; } 209test_admin_make_manifest() { $luarocks_admin make_manifest; }
203test_admin_add_rsync() { $luarocks_admin --server=testing add ./luasocket-2.0.2-5.src.rock; } 210test_admin_add_rsync() { $luarocks_admin --server=testing add ./luasocket-${verrev_luasocket}.src.rock; }
204test_admin_add_sftp() { export LUAROCKS_CONFIG="$testing_dir/testing_config_sftp.lua" && $luarocks_admin --server=testing add ./luasocket-2.0.2-5.src.rock; export LUAROCKS_CONFIG="$testing_dir/testing_config.lua"; } 211test_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"; }
205fail_admin_add_missing() { $luarocks_admin --server=testing add; } 212fail_admin_add_missing() { $luarocks_admin --server=testing add; }
206fail_admin_invalidserver() { $luarocks_admin --server=invalid add ./luasocket-2.0.2-5.src.rock; } 213fail_admin_invalidserver() { $luarocks_admin --server=invalid add ./luasocket-${verrev_luasocket}.src.rock; }
207fail_admin_invalidrock() { $luarocks_admin --server=testing add invalid; } 214fail_admin_invalidrock() { $luarocks_admin --server=testing add invalid; }
208test_admin_refresh_cache() { $luarocks_admin --server=testing refresh_cache; } 215test_admin_refresh_cache() { $luarocks_admin --server=testing refresh_cache; }
209test_admin_remove() { $luarocks_admin --server=testing remove luasocket; } 216test_admin_remove() { $luarocks_admin --server=testing remove luasocket; }
@@ -216,8 +223,8 @@ test_deps_mode_order_sys() { $luarocks build --tree="$testing_tree" lpeg && $lua
216test_deps_mode_all_sys() { $luarocks build --tree="$testing_tree" lpeg && $luarocks build --deps-mode=all --tree="$testing_sys_tree" lxsh && [ `$luarocks list --tree="$testing_sys_tree" --porcelain lpeg | wc -l` = 0 ]; } 223test_deps_mode_all_sys() { $luarocks build --tree="$testing_tree" lpeg && $luarocks build --deps-mode=all --tree="$testing_sys_tree" lxsh && [ `$luarocks list --tree="$testing_sys_tree" --porcelain lpeg | wc -l` = 0 ]; }
217test_deps_mode_none() { $luarocks build --tree="$testing_tree" --deps-mode=none lxsh; [ `$luarocks list --tree="$testing_tree" --porcelain lpeg | wc -l` = 0 ]; } 224test_deps_mode_none() { $luarocks build --tree="$testing_tree" --deps-mode=none lxsh; [ `$luarocks list --tree="$testing_tree" --porcelain lpeg | wc -l` = 0 ]; }
218test_deps_mode_nodeps_alias() { $luarocks build --tree="$testing_tree" --nodeps lxsh; [ `$luarocks list --tree="$testing_tree" --porcelain lpeg | wc -l` = 0 ]; } 225test_deps_mode_nodeps_alias() { $luarocks build --tree="$testing_tree" --nodeps lxsh; [ `$luarocks list --tree="$testing_tree" --porcelain lpeg | wc -l` = 0 ]; }
219test_deps_mode_make_order() { $luarocks build --tree="$testing_sys_tree" lpeg && rm -rf ./lxsh-0.8.6-1 && $luarocks download --src lxsh 0.8.6-1 && $luarocks unpack ./lxsh-0.8.6-1.src.rock && cd lxsh-0.8.6-1/lxsh-0.8.6-1 && $luarocks make --tree="$testing_tree" --deps-mode=order && cd ../.. && [ `$luarocks list --tree="$testing_tree" --porcelain lpeg | wc -l` = 0 ] && rm -rf ./lxsh-0.8.6-1; } 226test_deps_mode_make_order() { $luarocks build --tree="$testing_sys_tree" lpeg && 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 --tree="$testing_tree" --deps-mode=order && cd ../.. && [ `$luarocks list --tree="$testing_tree" --porcelain lpeg | wc -l` = 0 ] && rm -rf ./lxsh-${verrev_lxsh}; }
220test_deps_mode_make_order_sys() { $luarocks build --tree="$testing_tree" lpeg && rm -rf ./lxsh-0.8.6-1 && $luarocks download --src lxsh 0.8.6-1 && $luarocks unpack ./lxsh-0.8.6-1.src.rock && cd lxsh-0.8.6-1/lxsh-0.8.6-1 && $luarocks make --tree="$testing_sys_tree" --deps-mode=order && cd ../.. && [ `$luarocks list --tree="$testing_tree" --porcelain lpeg | wc -l` = 1 ] && rm -rf ./lxsh-0.8.6-1; } 227test_deps_mode_make_order_sys() { $luarocks build --tree="$testing_tree" lpeg && 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 --tree="$testing_sys_tree" --deps-mode=order && cd ../.. && [ `$luarocks list --tree="$testing_tree" --porcelain lpeg | wc -l` = 1 ] && rm -rf ./lxsh-${verrev_lxsh}; }
221 228
222# Driver ######################################### 229# Driver #########################################
223 230