aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/testing.sh20
1 files changed, 13 insertions, 7 deletions
diff --git a/test/testing.sh b/test/testing.sh
index 2c87183f..00ec9be5 100755
--- a/test/testing.sh
+++ b/test/testing.sh
@@ -78,7 +78,7 @@ rocks_servers = {
78} 78}
79local_cache = "$testing_cache" 79local_cache = "$testing_cache"
80upload_server = "testing" 80upload_server = "testing"
81upload_user = "hisham" 81upload_user = "$USER"
82upload_servers = { 82upload_servers = {
83 testing = { 83 testing = {
84 rsync = "localhost/tmp/luarocks_testing", 84 rsync = "localhost/tmp/luarocks_testing",
@@ -108,7 +108,7 @@ rocks_trees = {
108} 108}
109local_cache = "$testing_cache" 109local_cache = "$testing_cache"
110upload_server = "testing" 110upload_server = "testing"
111upload_user = "hisham" 111upload_user = "$USER"
112upload_servers = { 112upload_servers = {
113 testing = { 113 testing = {
114 sftp = "localhost/tmp/luarocks_testing", 114 sftp = "localhost/tmp/luarocks_testing",
@@ -154,6 +154,10 @@ then
154 make install INSTALL_TOP="$luadir" &> /dev/null 154 make install INSTALL_TOP="$luadir" &> /dev/null
155 fi 155 fi
156 popd 156 popd
157 [ -e ~/.ssh/id_rsa.pub ] || ssh-keygen -t rsa -P "" -f ~/.ssh/id_rsa
158 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
159 chmod og-wx ~/.ssh/authorized_keys
160 ssh-keyscan localhost >> ~/.ssh/known_hosts
157else 161else
158 luadir="/Programs/Lua/Current" 162 luadir="/Programs/Lua/Current"
159fi 163fi
@@ -432,19 +436,21 @@ test_unpack_src() { rm -rf ./cprint-${verrev_cprint} && $luarocks download --sou
432test_unpack_rockspec() { rm -rf ./cprint-${verrev_cprint} && $luarocks download --rockspec cprint && $luarocks unpack ./cprint-${verrev_cprint}.rockspec && rm -rf ./cprint-${verrev_cprint}; } 436test_unpack_rockspec() { rm -rf ./cprint-${verrev_cprint} && $luarocks download --rockspec cprint && $luarocks unpack ./cprint-${verrev_cprint}.rockspec && rm -rf ./cprint-${verrev_cprint}; }
433test_unpack_binary() { rm -rf ./cprint-${verrev_cprint} && $luarocks build cprint && $luarocks pack cprint && $luarocks unpack ./cprint-${verrev_cprint}.${platform}.rock && rm -rf ./cprint-${verrev_cprint}; } 437test_unpack_binary() { rm -rf ./cprint-${verrev_cprint} && $luarocks build cprint && $luarocks pack cprint && $luarocks unpack ./cprint-${verrev_cprint}.${platform}.rock && rm -rf ./cprint-${verrev_cprint}; }
434fail_unpack_invalidpatch() { need_luasocket; $luarocks unpack "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; } 438fail_unpack_invalidpatch() { need_luasocket; $luarocks unpack "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; }
439fail_unpack_invalidrockspec() { need_luasocket; $luarocks unpack "invalid.rockspec"; }
435 440
436fail_upload_invalidrockspec() { $luarocks upload "invalid.rockspec"; } 441fail_upload_invalidrockspec() { $luarocks upload "invalid.rockspec"; }
442fail_upload_invalidkey() { $luarocks upload --api-key="invalid" "invalid.rockspec"; }
437 443
438test_admin_help() { $luarocks_admin help; } 444test_admin_help() { $luarocks_admin help; }
439 445
440test_admin_make_manifest() { $luarocks_admin make_manifest; } 446test_admin_make_manifest() { $luarocks_admin make_manifest; }
441test_admin_add_rsync() { if [ "$travis" ]; then return; fi; $luarocks_admin --server=testing add "$testing_server/luasocket-${verrev_luasocket}.src.rock"; } 447test_admin_add_rsync() { $luarocks_admin --server=testing add "$testing_server/luasocket-${verrev_luasocket}.src.rock"; }
442test_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"; } 448test_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"; }
443fail_admin_add_missing() { $luarocks_admin --server=testing add; } 449fail_admin_add_missing() { $luarocks_admin --server=testing add; }
444fail_admin_invalidserver() { $luarocks_admin --server=invalid add "$testing_server/luasocket-${verrev_luasocket}.src.rock"; } 450fail_admin_invalidserver() { $luarocks_admin --server=invalid add "$testing_server/luasocket-${verrev_luasocket}.src.rock"; }
445fail_admin_invalidrock() { if [ "$travis" ]; then return 1; fi; $luarocks_admin --server=testing add invalid; } 451fail_admin_invalidrock() { $luarocks_admin --server=testing add invalid; }
446test_admin_refresh_cache() { if [ "$travis" ]; then return; fi; $luarocks_admin --server=testing refresh_cache; } 452test_admin_refresh_cache() { $luarocks_admin --server=testing refresh_cache; }
447test_admin_remove() { if [ "$travis" ]; then return; fi; $luarocks_admin --server=testing remove luasocket-${verrev_luasocket}.src.rock; } 453test_admin_remove() { $luarocks_admin --server=testing remove luasocket-${verrev_luasocket}.src.rock; }
448fail_admin_remove_missing() { $luarocks_admin --server=testing remove; } 454fail_admin_remove_missing() { $luarocks_admin --server=testing remove; }
449 455
450fail_deps_mode_invalid_arg() { $luarocks remove luacov --deps-mode; } 456fail_deps_mode_invalid_arg() { $luarocks remove luacov --deps-mode; }