aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormpeterv <mpeterval@gmail.com>2016-04-16 11:39:18 +0300
committermpeterv <mpeterval@gmail.com>2016-04-16 11:39:18 +0300
commit53788ea4054cc619d610bf19d948e1a16325b89c (patch)
tree6ed0c12f4110075ee8bbc202e5c82b60892b5b09 /test
parent3856404d5f38addd2d20d930bc0a64d1ecc2a5d5 (diff)
parent3576869364203e2325a03960dd2c0d618355cb63 (diff)
downloadluarocks-53788ea4054cc619d610bf19d948e1a16325b89c.tar.gz
luarocks-53788ea4054cc619d610bf19d948e1a16325b89c.tar.bz2
luarocks-53788ea4054cc619d610bf19d948e1a16325b89c.zip
Merge branch 'master' into luarocks-3
Conflicts: src/luarocks/deps.lua
Diffstat (limited to 'test')
-rw-r--r--test/testing.bat2
-rw-r--r--test/testing.lua6
-rwxr-xr-xtest/testing.sh67
3 files changed, 52 insertions, 23 deletions
diff --git a/test/testing.bat b/test/testing.bat
index 319e12c3..7083678b 100644
--- a/test/testing.bat
+++ b/test/testing.bat
@@ -1,7 +1,7 @@
1@echo off 1@echo off
2Setlocal EnableDelayedExpansion EnableExtensions 2Setlocal EnableDelayedExpansion EnableExtensions
3 3
4if not defined LUAROCKS_REPO set LUAROCKS_REPO=http://rocks.moonscript.org 4if not defined LUAROCKS_REPO set LUAROCKS_REPO=https://luarocks.org
5 5
6appveyor DownloadFile %LUAROCKS_REPO%/stdlib-41.0.0-1.src.rock 6appveyor DownloadFile %LUAROCKS_REPO%/stdlib-41.0.0-1.src.rock
7luarocks build stdlib 7luarocks build stdlib
diff --git a/test/testing.lua b/test/testing.lua
index 63dead2b..6d4b4b05 100644
--- a/test/testing.lua
+++ b/test/testing.lua
@@ -86,6 +86,7 @@ local tests = {
86 fail_arg_string_followed_by_flag = function() return run "$luarocks --server --porcelain" end, 86 fail_arg_string_followed_by_flag = function() return run "$luarocks --server --porcelain" end,
87 fail_arg_string_unknown = function() return run "$luarocks --invalid-flag=abc" end, 87 fail_arg_string_unknown = function() return run "$luarocks --invalid-flag=abc" end,
88 test_empty_list = function() return run "$luarocks list" end, 88 test_empty_list = function() return run "$luarocks list" end,
89 test_list_outdated = function () return run "$luarocks list --outdated" end,
89 fail_sysconfig_err = function() 90 fail_sysconfig_err = function()
90 mkdir "$testing_lrprefix/etc/luarocks" 91 mkdir "$testing_lrprefix/etc/luarocks"
91 file_set_contents("$testing_lrprefix/etc/luarocks/config.lua", "aoeui") 92 file_set_contents("$testing_lrprefix/etc/luarocks/config.lua", "aoeui")
@@ -441,6 +442,11 @@ local tests = {
441 return run "$luarocks install luarepl" 442 return run "$luarocks install luarepl"
442 and run "$luarocks doc luarepl" 443 and run "$luarocks doc luarepl"
443 end, 444 end,
445 test_doc_home = function()
446 return run "$luarocks install luacov"
447 and run "$luarocks doc luacov --home"
448 end,
449 fail_doc_invalid = function () return run "$luarocks doc invalid" end,
444 450
445 -- Tests for https://github.com/keplerproject/luarocks/issues/375 451 -- Tests for https://github.com/keplerproject/luarocks/issues/375
446 test_fetch_base_dir = function() 452 test_fetch_base_dir = function()
diff --git a/test/testing.sh b/test/testing.sh
index a198c2f2..3a132a2b 100755
--- a/test/testing.sh
+++ b/test/testing.sh
@@ -127,20 +127,15 @@ upload_servers = {
127EOF 127EOF
128cat <<EOF > $testing_dir/luacov.config 128cat <<EOF > $testing_dir/luacov.config
129return { 129return {
130 ["configfile"] = ".luacov", 130 statsfile = "$testing_dir/luacov.stats.out",
131 ["statsfile"] = "$testing_dir/luacov.stats.out", 131 reportfile = "$testing_dir/luacov.report.out",
132 ["reportfile"] = "$testing_dir/luacov.report.out", 132 modules = {
133 runreport = false, 133 ["luarocks"] = "src/bin/luarocks",
134 deletestats = false, 134 ["luarocks-admin"] = "src/bin/luarocks-admin",
135 ["include"] = {}, 135 ["luarocks.*"] = "src",
136 ["exclude"] = { 136 ["luarocks.*.*"] = "src",
137 "luacov$", 137 ["luarocks.*.*.*"] = "src"
138 "luacov%.reporter$", 138 }
139 "luacov%.defaults$",
140 "luacov%.runner$",
141 "luacov%.stats$",
142 "luacov%.tick$",
143 },
144} 139}
145EOF 140EOF
146 141
@@ -218,7 +213,7 @@ srcdir_luasocket=luasocket-3.0-rc1
218version_cprint=0.1 213version_cprint=0.1
219verrev_cprint=0.1-2 214verrev_cprint=0.1-2
220 215
221version_luacov=0.8 216version_luacov=0.9.1
222verrev_luacov=${version_luacov}-1 217verrev_luacov=${version_luacov}-1
223version_lxsh=0.8.6 218version_lxsh=0.8.6
224version_validate_args=1.5.4 219version_validate_args=1.5.4
@@ -265,7 +260,7 @@ luajit_luarocks="luajit -e require('luacov.runner')('$testing_dir/luacov.config'
265mkdir -p "$testing_server" 260mkdir -p "$testing_server"
266( 261(
267 cd "$testing_server" 262 cd "$testing_server"
268 luarocks_repo="http://rocks.moonscript.org" 263 luarocks_repo="https://luarocks.org"
269 get() { [ -e `basename "$1"` ] || wget -c "$1"; } 264 get() { [ -e `basename "$1"` ] || wget -c "$1"; }
270 get "$luarocks_repo/luacov-${verrev_luacov}.src.rock" 265 get "$luarocks_repo/luacov-${verrev_luacov}.src.rock"
271 get "$luarocks_repo/luacov-${verrev_luacov}.rockspec" 266 get "$luarocks_repo/luacov-${verrev_luacov}.rockspec"
@@ -380,7 +375,10 @@ fail_arg_string_no_parameter() { $luarocks --server; }
380fail_arg_string_followed_by_flag() { $luarocks --server --porcelain; } 375fail_arg_string_followed_by_flag() { $luarocks --server --porcelain; }
381fail_arg_string_unknown() { $luarocks --invalid-flag=abc; } 376fail_arg_string_unknown() { $luarocks --invalid-flag=abc; }
382 377
378fail_invalid_assignment() { $luarocks invalid=5; }
379
383test_empty_list() { $luarocks list; } 380test_empty_list() { $luarocks list; }
381test_list_outdated() { $luarocks list --outdated; }
384 382
385fail_sysconfig_err() { local err=0; local scdir="$testing_lrprefix/etc/luarocks/"; mkdir -p "$scdir"; local sysconfig="$scdir/config.lua"; echo "aoeui" > "$sysconfig"; echo $sysconfig; $luarocks list; err=$?; rm "$sysconfig"; return "$err"; } 383fail_sysconfig_err() { local err=0; local scdir="$testing_lrprefix/etc/luarocks/"; mkdir -p "$scdir"; local sysconfig="$scdir/config.lua"; echo "aoeui" > "$sysconfig"; echo $sysconfig; $luarocks list; err=$?; rm "$sysconfig"; return "$err"; }
386fail_sysconfig_default_err() { local err=0; local scdir="$testing_lrprefix/etc/luarocks/"; mkdir -p "$scdir"; local sysconfig="$scdir/config-$luashortversion.lua"; echo "aoeui" > "$sysconfig"; echo $sysconfig; $luarocks list; err=$?; rm "$sysconfig"; return "$err"; } 384fail_sysconfig_default_err() { local err=0; local scdir="$testing_lrprefix/etc/luarocks/"; mkdir -p "$scdir"; local sysconfig="$scdir/config-$luashortversion.lua"; echo "aoeui" > "$sysconfig"; echo $sysconfig; $luarocks list; err=$?; rm "$sysconfig"; return "$err"; }
@@ -415,6 +413,12 @@ fail_build_permissions() { $luarocks build --tree=/usr lpeg; }
415fail_build_permissions_parent() { $luarocks build --tree=/usr/invalid lpeg; } 413fail_build_permissions_parent() { $luarocks build --tree=/usr/invalid lpeg; }
416 414
417test_build_verbose() { $luarocks build --verbose lpeg; } 415test_build_verbose() { $luarocks build --verbose lpeg; }
416test_build_timeout() { $luarocks --timeout=10; }
417fail_build_timeout_invalid() { $luarocks --timeout=abc; }
418test_build_branch() { $luarocks build --branch=master lpeg; }
419fail_build_invalid_entry_deps_mode() { $luarocks build --deps-mode=123 lpeg; }
420test_build_only_server() { $luarocks --only-server=testing; }
421test_build_only_sources() { $luarocks build --only-sources="http://example.com" lpeg; }
418fail_build_blank_arg() { $luarocks build --tree="" lpeg; } 422fail_build_blank_arg() { $luarocks build --tree="" lpeg; }
419test_build_withpatch() { need_luasocket; $luarocks build luadoc; } 423test_build_withpatch() { need_luasocket; $luarocks build luadoc; }
420test_build_diffversion() { $luarocks build luacov ${version_luacov}; } 424test_build_diffversion() { $luarocks build luacov ${version_luacov}; }
@@ -427,6 +431,8 @@ test_build_only_deps_rockspec() { $luarocks download --rockspec lxsh ${verrev_lx
427test_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 ]; }; } 431test_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 ]; }; }
428test_build_only_deps() { $luarocks build luasec --only-deps && { $luarocks show luasec; [ $? -ne 0 ]; }; } 432test_build_only_deps() { $luarocks build luasec --only-deps && { $luarocks show luasec; [ $? -ne 0 ]; }; }
429test_install_only_deps() { $luarocks install lxsh ${verrev_lxsh} --only-deps && { $luarocks show lxsh; [ $? -ne 0 ]; }; } 433test_install_only_deps() { $luarocks install lxsh ${verrev_lxsh} --only-deps && { $luarocks show lxsh; [ $? -ne 0 ]; }; }
434test_build_no_deps() { $luarocks build luasec --nodeps; }
435test_install_no_deps() { $luarocks install luasec --nodeps; }
430fail_build_missing_external() { $luarocks build "$testing_dir/testfiles/missing_external-0.1-1.rockspec" INEXISTENT_INCDIR="/invalid/dir"; } 436fail_build_missing_external() { $luarocks build "$testing_dir/testfiles/missing_external-0.1-1.rockspec" INEXISTENT_INCDIR="/invalid/dir"; }
431fail_build_invalidpatch() { need_luasocket; $luarocks build "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; } 437fail_build_invalidpatch() { need_luasocket; $luarocks build "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; }
432 438
@@ -461,12 +467,15 @@ test_list() { $luarocks list; }
461test_list_porcelain() { $luarocks list --porcelain; } 467test_list_porcelain() { $luarocks list --porcelain; }
462 468
463test_make_with_rockspec() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks download --source luasocket && $luarocks unpack ./luasocket-${verrev_luasocket}.src.rock && cd luasocket-${verrev_luasocket}/${srcdir_luasocket} && $luarocks make luasocket-${verrev_luasocket}.rockspec && cd ../.. && rm -rf ./luasocket-${verrev_luasocket}; } 469test_make_with_rockspec() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks download --source luasocket && $luarocks unpack ./luasocket-${verrev_luasocket}.src.rock && cd luasocket-${verrev_luasocket}/${srcdir_luasocket} && $luarocks make luasocket-${verrev_luasocket}.rockspec && cd ../.. && rm -rf ./luasocket-${verrev_luasocket}; }
464test_make_default_rockspec() { rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --source lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && $luarocks make && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; } 470test_make_default_rockspec() { rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --source lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && $luarocks new_version lxsh-${verrev_lxsh}.rockspec && $luarocks make && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; }
471test_make_unnamed_rockspec() { rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --source lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && cp lxsh-${verrev_lxsh}.rockspec rockspec && $luarocks make && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; }
472fail_make_ambiguous_rockspec() { rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --source lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && cp lxsh-${verrev_lxsh}.rockspec lxsh2-${verrev_lxsh}.rockspec && $luarocks make && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; }
473fail_make_ambiguous_unnamed_rockspec() { rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --source lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && mv lxsh-${verrev_lxsh}.rockspec 1_rockspec && cp 1_rockspec 2_rockspec && $luarocks make && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; }
465test_make_pack_binary_rock() { rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --source 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}; } 474test_make_pack_binary_rock() { rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --source 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}; }
466fail_make_which_rockspec() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks download --source luasocket && $luarocks unpack ./luasocket-${verrev_luasocket}.src.rock && cd luasocket-${verrev_luasocket}/${srcdir_luasocket} && $luarocks make && cd ../.. && rm -rf ./luasocket-${verrev_luasocket}; }
467 475
468test_new_version() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec 0.2 && rm ./luacov-0.*; } 476test_new_version() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec 0.2 && rm ./luacov-0.*; }
469test_new_version_url() { $luarocks download --rockspec abelhas 1.0 && $luarocks new_version ./abelhas-1.0-1.rockspec 1.1 https://github.com/downloads/ittner/abelhas/abelhas-1.1.tar.gz && rm ./abelhas-*; } 477test_new_version_url() { $luarocks download --rockspec abelhas 1.0 && $luarocks new_version ./abelhas-1.0-1.rockspec 1.1 https://github.com/downloads/ittner/abelhas/abelhas-1.1.tar.gz && rm ./abelhas-*; }
478test_new_version_tag() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec --tag v0.3 && rm ./luacov-0.3-1.rockspec; }
470 479
471test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; } 480test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; }
472test_pack_src() { $luarocks install $luasec && $luarocks download --rockspec luasocket && $luarocks pack ./luasocket-${verrev_luasocket}.rockspec && rm ./luasocket-${version_luasocket}-*.rock; } 481test_pack_src() { $luarocks install $luasec && $luarocks download --rockspec luasocket && $luarocks pack ./luasocket-${verrev_luasocket}.rockspec && rm ./luasocket-${version_luasocket}-*.rock; }
@@ -487,10 +496,18 @@ fail_remove_invalid_name() { $luarocks remove invalid.rock; }
487 496
488test_search_found() { $luarocks search zlib; } 497test_search_found() { $luarocks search zlib; }
489test_search_missing() { $luarocks search missing_rock; } 498test_search_missing() { $luarocks search missing_rock; }
499test_search_version() { $luarocks search zlib 1.1; }
500test_search_all() { $luarocks search --all; }
501fail_search_nostring() { $var=123; $luarocks search $var; }
490 502
491test_show() { $luarocks show luacov; } 503test_show() { $luarocks show luacov; }
492test_show_modules() { $luarocks show --modules luacov; } 504test_show_modules() { $luarocks show --modules luacov; }
493test_show_home() { $luarocks show --home luacov; } 505test_show_home() { $luarocks show --home luacov; }
506test_show_deps() { $luarocks show --deps luacov; }
507test_show_rockspec() { $luarocks show --rockspec luacov; }
508test_show_mversion() { $luarocks show --mversion luacov; }
509test_show_rocktree() { $luarocks show --rock-tree luacov; }
510test_show_rockdir() { $luarocks show --rock-dir luacov; }
494test_show_depends() { need_luasocket; $luarocks install $luasec && $luarocks show luasec; } 511test_show_depends() { need_luasocket; $luarocks install $luasec && $luarocks show luasec; }
495test_show_oldversion() { $luarocks install luacov ${version_luacov} && $luarocks show luacov ${version_luacov}; } 512test_show_oldversion() { $luarocks install luacov ${version_luacov} && $luarocks show luacov ${version_luacov}; }
496 513
@@ -515,6 +532,7 @@ fail_admin_invalidrock() { $luarocks_admin --server=testing add invalid; }
515test_admin_refresh_cache() { $luarocks_admin --server=testing refresh_cache; } 532test_admin_refresh_cache() { $luarocks_admin --server=testing refresh_cache; }
516test_admin_remove() { $luarocks_admin --server=testing remove luasocket-${verrev_luasocket}.src.rock; } 533test_admin_remove() { $luarocks_admin --server=testing remove luasocket-${verrev_luasocket}.src.rock; }
517fail_admin_remove_missing() { $luarocks_admin --server=testing remove; } 534fail_admin_remove_missing() { $luarocks_admin --server=testing remove; }
535fail_admin_split_server_url() { $luarocks_admin --server="localhost@/tmp/luarocks_testing" add "$testing_server/luasocket-${verrev_luasocket}.src.rock"; }
518 536
519fail_deps_mode_invalid_arg() { $luarocks remove luacov --deps-mode; } 537fail_deps_mode_invalid_arg() { $luarocks remove luacov --deps-mode; }
520test_deps_mode_one() { $luarocks build --tree="system" lpeg && $luarocks list && $luarocks build --deps-mode=one --tree="$testing_tree" lxsh && [ `$luarocks_noecho list --tree="$testing_tree" --porcelain lpeg | wc -l` = 1 ]; } 538test_deps_mode_one() { $luarocks build --tree="system" lpeg && $luarocks list && $luarocks build --deps-mode=one --tree="$testing_tree" lxsh && [ `$luarocks_noecho list --tree="$testing_tree" --porcelain lpeg | wc -l` = 1 ]; }
@@ -527,6 +545,7 @@ test_deps_mode_make_order() { $luarocks build --tree="$testing_sys_tree" lpeg &&
527test_deps_mode_make_order_sys() { $luarocks build --tree="$testing_tree" lpeg && rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --source 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_noecho list --tree="$testing_tree" --porcelain lpeg | wc -l` = 1 ] && rm -rf ./lxsh-${verrev_lxsh}; } 545test_deps_mode_make_order_sys() { $luarocks build --tree="$testing_tree" lpeg && rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --source 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_noecho list --tree="$testing_tree" --porcelain lpeg | wc -l` = 1 ] && rm -rf ./lxsh-${verrev_lxsh}; }
528 546
529test_write_rockspec() { $luarocks write_rockspec git://github.com/keplerproject/luarocks; } 547test_write_rockspec() { $luarocks write_rockspec git://github.com/keplerproject/luarocks; }
548test_write_rockspec_tag() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --tag=v2.3.0; }
530test_write_rockspec_lib() { $luarocks write_rockspec git://github.com/mbalmer/luafcgi --lib=fcgi --license="3-clause BSD" --lua-version=5.1,5.2; } 549test_write_rockspec_lib() { $luarocks write_rockspec git://github.com/mbalmer/luafcgi --lib=fcgi --license="3-clause BSD" --lua-version=5.1,5.2; }
531test_write_rockspec_format() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --rockspec-format=1.1 --lua-version=5.1,5.2; } 550test_write_rockspec_format() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --rockspec-format=1.1 --lua-version=5.1,5.2; }
532test_write_rockspec_fullargs() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --lua-version=5.1,5.2 --license="MIT/X11" --homepage="http://www.luarocks.org" --summary="A package manager for Lua modules"; } 551test_write_rockspec_fullargs() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --lua-version=5.1,5.2 --license="MIT/X11" --homepage="http://www.luarocks.org" --summary="A package manager for Lua modules"; }
@@ -574,6 +593,8 @@ fail_luajit_dependency() {
574} 593}
575 594
576test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } 595test_doc() { $luarocks install luarepl; $luarocks doc luarepl; }
596test_doc_home() { $luarocks install luacov; $luarocks doc luacov --home; }
597fail_doc_invalid() { $luarocks doc invalid; }
577 598
578# Driver ######################################### 599# Driver #########################################
579 600
@@ -639,16 +660,18 @@ run_all_tests() {
639run_all_tests $1 660run_all_tests $1
640#run_with_minimal_environment $1 661#run_with_minimal_environment $1
641 662
663cd "$testing_dir/.."
664
642if [ "$travis" ] 665if [ "$travis" ]
643then 666then
644 if [ "$TRAVIS" ] 667 if [ "$TRAVIS" ]
645 then 668 then
646 build_environment luacov luafilesystem luacov-coveralls 669 build_environment luacov luafilesystem luacov-coveralls
647 ( cd $testing_dir; $testing_sys_tree/bin/luacov-coveralls || echo "ok" ) 670 $testing_sys_tree/bin/luacov-coveralls -c "$testing_dir/luacov.config" || echo "ok"
648 fi 671 fi
649 $testing_sys_tree/bin/luacov -c $testing_dir/luacov.config src/luarocks src/bin 672 $testing_sys_tree/bin/luacov -c "$testing_dir/luacov.config"
650 grep "Summary" -B1 -A1000 $testing_dir/luacov.report.out 673 grep "Summary" -B1 -A1000 "$testing_dir/luacov.report.out"
651else 674else
652 $testing_sys_tree/bin/luacov -c $testing_dir/luacov.config src/luarocks src/bin 675 $testing_sys_tree/bin/luacov -c "$testing_dir/luacov.config"
653 cat "$testing_dir/luacov.report.out" 676 cat "$testing_dir/luacov.report.out"
654fi 677fi