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