aboutsummaryrefslogtreecommitdiff
path: root/test/testing.sh
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2014-02-08 18:33:26 -0200
committerHisham Muhammad <hisham@gobolinux.org>2014-02-08 18:33:26 -0200
commit916f3b9afecbe6033ac2f39700e60c1ed4e0edc4 (patch)
treea535ee802b38e0039a011fdbdeb06cf450c5b9c7 /test/testing.sh
parente6ebf473e09afed69895e6501580fbc47bf13534 (diff)
downloadluarocks-916f3b9afecbe6033ac2f39700e60c1ed4e0edc4.tar.gz
luarocks-916f3b9afecbe6033ac2f39700e60c1ed4e0edc4.tar.bz2
luarocks-916f3b9afecbe6033ac2f39700e60c1ed4e0edc4.zip
Add test for missing external deps. Improves coverage.
A bug was uncovered writing this!
Diffstat (limited to 'test/testing.sh')
-rwxr-xr-xtest/testing.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/testing.sh b/test/testing.sh
index a0bfeeca..5ae21d81 100755
--- a/test/testing.sh
+++ b/test/testing.sh
@@ -72,6 +72,18 @@ upload_servers = {
72 rsync = "localhost/tmp/luarocks_testing", 72 rsync = "localhost/tmp/luarocks_testing",
73 }, 73 },
74} 74}
75external_deps_dirs = {
76 "/usr/local",
77 "/usr",
78 -- These are used for a test that fails, so it
79 -- can point to invalid paths:
80 {
81 prefix = "/opt",
82 bin = "bin",
83 include = "include",
84 lib = { "lib", "lib64" },
85 }
86}
75EOF 87EOF
76( 88(
77 cat $testing_dir/testing_config.lua 89 cat $testing_dir/testing_config.lua
@@ -327,8 +339,9 @@ test_build_diffversion() { $luarocks build luacov ${version_luacov}; }
327test_build_command() { $luarocks build stdlib; } 339test_build_command() { $luarocks build stdlib; }
328test_build_install_bin() { $luarocks build luarepl; } 340test_build_install_bin() { $luarocks build luarepl; }
329fail_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; } 341fail_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; }
330test_build_https() { need_luasocket; $luarocks download --rockspec validate-args ${verrev_validate_args} && echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx && pwd && ls && $luarocks install $luasec && pwd && ls && $luarocks build ./validate-args-${verrev_validate_args}.rockspec && rm ./validate-args-${verrev_validate_args}.rockspec; } 342test_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; }
331test_build_supported_platforms() { $luarocks build lpty; } 343test_build_supported_platforms() { $luarocks build lpty; }
344fail_build_missing_external() { $luarocks build "$testing_dir/testfiles/missing_external-0.1-1.rockspec" INEXISTENT_INCDIR="/invalid/dir"; }
332 345
333test_build_deps_partial_match() { $luarocks build lrandom; } 346test_build_deps_partial_match() { $luarocks build lrandom; }
334test_build_show_downloads() { export LUAROCKS_CONFIG="$testing_dir/testing_config_show_downloads.lua" && $luarocks build alien; export LUAROCKS_CONFIG="$testing_dir/testing_config.lua"; } 347test_build_show_downloads() { export LUAROCKS_CONFIG="$testing_dir/testing_config_show_downloads.lua" && $luarocks build alien; export LUAROCKS_CONFIG="$testing_dir/testing_config.lua"; }