aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIgnacio Burgueño <ignaciob@inconcertcc.com>2015-04-14 12:34:54 -0300
committerIgnacio Burgueño <ignaciob@inconcertcc.com>2015-04-14 12:34:54 -0300
commit6b350de4daaccba8b142c5db0d8fb8fabaa1649b (patch)
tree31afb5a925cbc5990c5aa7a05cc84d0825afad70 /test
parent0f67be5258e25d8cf68b2a50535e82dd0c757206 (diff)
downloadluarocks-6b350de4daaccba8b142c5db0d8fb8fabaa1649b.tar.gz
luarocks-6b350de4daaccba8b142c5db0d8fb8fabaa1649b.tar.bz2
luarocks-6b350de4daaccba8b142c5db0d8fb8fabaa1649b.zip
Adds --only-deps flag to install command
Introduces new function in 'install' module to only install the dependencies of a rock. Also adds the tests to the wip Lua test driver.
Diffstat (limited to 'test')
-rw-r--r--test/testing.lua12
-rwxr-xr-xtest/testing.sh22
2 files changed, 16 insertions, 18 deletions
diff --git a/test/testing.lua b/test/testing.lua
index 376d6e9a..45ee941a 100644
--- a/test/testing.lua
+++ b/test/testing.lua
@@ -140,6 +140,18 @@ local tests = {
140 and rm "./validate-args-${verrev_validate_args}.rockspec" 140 and rm "./validate-args-${verrev_validate_args}.rockspec"
141 end, 141 end,
142 test_build_supported_platforms = function() return run "$luarocks build lpty" end, 142 test_build_supported_platforms = function() return run "$luarocks build lpty" end,
143 test_build_only_deps_rockspec = function()
144 return run "$luarocks download --rockspec lxsh ${verrev_lxsh}"
145 and run "$luarocks build ./lxsh-${verrev_lxsh}.rockspec --only-deps"
146 and run "$luarocks show lxsh; [ $? -ne 0 ]; };"
147 end,
148 test_build_only_deps_src_rock = function()
149 return run "$luarocks download --source lxsh ${verrev_lxsh}"
150 and run "$luarocks build ./lxsh-${verrev_lxsh}.src.rock --only-deps"
151 and run "$luarocks show lxsh; [ $? -ne 0 ]; };"
152 end,
153 test_build_only_deps = function() return run "$luarocks build luasec --only-deps" and run "$luarocks show luasec; [ $? -ne 0 ]; };" end,
154 test_install_only_deps = function() return run "$luarocks install lxsh ${verrev_lxsh} --only-deps" and run "$luarocks show lxsh; [ $? -ne 0 ]; };" end,
143 fail_build_missing_external = function() return run '$luarocks build "$testing_dir/testfiles/missing_external-0.1-1.rockspec" INEXISTENT_INCDIR="/invalid/dir"' end, 155 fail_build_missing_external = function() return run '$luarocks build "$testing_dir/testfiles/missing_external-0.1-1.rockspec" INEXISTENT_INCDIR="/invalid/dir"' end,
144 fail_build_invalidpatch = function() 156 fail_build_invalidpatch = function()
145 need_luasocket() 157 need_luasocket()
diff --git a/test/testing.sh b/test/testing.sh
index 78e60a76..7f0a4ae0 100755
--- a/test/testing.sh
+++ b/test/testing.sh
@@ -387,24 +387,10 @@ test_build_install_bin() { $luarocks build luarepl; }
387test_build_nohttps() { need_luasocket; $luarocks download --rockspec validate-args ${verrev_validate_args} && $luarocks build ./validate-args-${version_validate_args}-1.rockspec && rm ./validate-args-${version_validate_args}-1.rockspec; } 387test_build_nohttps() { need_luasocket; $luarocks download --rockspec validate-args ${verrev_validate_args} && $luarocks build ./validate-args-${version_validate_args}-1.rockspec && rm ./validate-args-${version_validate_args}-1.rockspec; }
388test_build_https() { need_luasocket; $luarocks download --rockspec validate-args ${verrev_validate_args} && $luarocks install $luasec && $luarocks build ./validate-args-${verrev_validate_args}.rockspec && rm ./validate-args-${verrev_validate_args}.rockspec; } 388test_build_https() { need_luasocket; $luarocks download --rockspec validate-args ${verrev_validate_args} && $luarocks install $luasec && $luarocks build ./validate-args-${verrev_validate_args}.rockspec && rm ./validate-args-${verrev_validate_args}.rockspec; }
389test_build_supported_platforms() { $luarocks build lpty; } 389test_build_supported_platforms() { $luarocks build lpty; }
390test_build_only_deps_rockspec() { $luarocks download --rockspec lxsh ${verrev_lxsh} ; $luarocks build ./lxsh-${verrev_lxsh}.rockspec --only-deps; $luarocks show lxsh; 390test_build_only_deps_rockspec() { $luarocks download --rockspec lxsh ${verrev_lxsh} && $luarocks build ./lxsh-${verrev_lxsh}.rockspec --only-deps && { $luarocks show lxsh; [ $? -ne 0 ]; }; }
391 if [ $? -ne 0 ] 391test_build_only_deps_src_rock() { $luarocks download --source lxsh ${verrev_lxsh} && $luarocks build ./lxsh-${verrev_lxsh}.src.rock --only-deps && { $luarocks show lxsh; [ $? -ne 0 ]; }; }
392 then return 0; 392test_build_only_deps() { $luarocks build luasec --only-deps && { $luarocks show luasec; [ $? -ne 0 ]; }; }
393 fi; 393test_install_only_deps() { $luarocks install lxsh ${verrev_lxsh} --only-deps && { $luarocks show lxsh; [ $? -ne 0 ]; }; }
394 return 1;
395}
396test_build_only_deps_src_rock() { $luarocks download --source lxsh ${verrev_lxsh} ; $luarocks build ./lxsh-${verrev_lxsh}.src.rock --only-deps; $luarocks show lxsh;
397 if [ $? -ne 0 ]
398 then return 0;
399 fi;
400 return 1;
401}
402test_build_only_deps() { $luarocks build luasec --only-deps; $luarocks show luasec;
403 if [ $? -ne 0 ]
404 then return 0;
405 fi;
406 return 1;
407}
408fail_build_missing_external() { $luarocks build "$testing_dir/testfiles/missing_external-0.1-1.rockspec" INEXISTENT_INCDIR="/invalid/dir"; } 394fail_build_missing_external() { $luarocks build "$testing_dir/testfiles/missing_external-0.1-1.rockspec" INEXISTENT_INCDIR="/invalid/dir"; }
409fail_build_invalidpatch() { need_luasocket; $luarocks build "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; } 395fail_build_invalidpatch() { need_luasocket; $luarocks build "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; }
410 396