diff options
author | Hisham <hisham@gobolinux.org> | 2016-09-08 14:04:40 -0300 |
---|---|---|
committer | Hisham <hisham@gobolinux.org> | 2016-09-08 14:04:40 -0300 |
commit | f91fc9a6ef9ef488c709894a29ce63db2bc1e399 (patch) | |
tree | 3b9dbbe28ad79f2d1115b2048f3cbf9738303373 /spec/install_spec.lua | |
parent | c6d48427430b6b96f88b249dee1533fb5e6ff681 (diff) | |
download | luarocks-f91fc9a6ef9ef488c709894a29ce63db2bc1e399.tar.gz luarocks-f91fc9a6ef9ef488c709894a29ce63db2bc1e399.tar.bz2 luarocks-f91fc9a6ef9ef488c709894a29ce63db2bc1e399.zip |
Tests: luarocks_bool commands log their outputs on failure.
Diffstat (limited to 'spec/install_spec.lua')
-rw-r--r-- | spec/install_spec.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/install_spec.lua b/spec/install_spec.lua index e5b9e2cc..8857e4bd 100644 --- a/spec/install_spec.lua +++ b/spec/install_spec.lua | |||
@@ -66,15 +66,15 @@ describe("LuaRocks install tests #blackbox #b_install", function() | |||
66 | end) | 66 | end) |
67 | 67 | ||
68 | it("LuaRocks install luasec and show luasocket (dependency)", function() | 68 | it("LuaRocks install luasec and show luasocket (dependency)", function() |
69 | assert.is_true(run.luarocks_bool(test_env.quiet("install luasec " .. test_env.OPENSSL_DIRS))) | 69 | assert.is_true(run.luarocks_bool("install luasec " .. test_env.OPENSSL_DIRS)) |
70 | assert.is_true(run.luarocks_bool("show luasocket")) | 70 | assert.is_true(run.luarocks_bool("show luasocket")) |
71 | end) | 71 | end) |
72 | end) | 72 | end) |
73 | 73 | ||
74 | describe("LuaRocks install - more complex tests", function() | 74 | describe("LuaRocks install - more complex tests", function() |
75 | it('LuaRocks install luasec with skipping dependency checks', function() | 75 | it('LuaRocks install luasec with skipping dependency checks', function() |
76 | assert.is_true(run.luarocks_bool(test_env.quiet("install luasec " .. test_env.OPENSSL_DIRS .. " --nodeps"))) | 76 | assert.is_true(run.luarocks_bool("install luasec " .. test_env.OPENSSL_DIRS .. " --nodeps")) |
77 | assert.is_true(run.luarocks_bool(test_env.quiet("show luasec"))) | 77 | assert.is_true(run.luarocks_bool("show luasec")) |
78 | if env_variables.TYPE_TEST_ENV == "minimal" then | 78 | if env_variables.TYPE_TEST_ENV == "minimal" then |
79 | assert.is_false(run.luarocks_bool(test_env.quiet("show luasocket"))) | 79 | assert.is_false(run.luarocks_bool(test_env.quiet("show luasocket"))) |
80 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasocket")) | 80 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasocket")) |
@@ -83,21 +83,21 @@ describe("LuaRocks install tests #blackbox #b_install", function() | |||
83 | end) | 83 | end) |
84 | 84 | ||
85 | it("LuaRocks install only-deps of luasocket packed rock", function() | 85 | it("LuaRocks install only-deps of luasocket packed rock", function() |
86 | assert.is_true(run.luarocks_bool(test_env.quiet("build --pack-binary-rock luasocket 3.0rc1-2"))) | 86 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket 3.0rc1-2")) |
87 | local output = run.luarocks("install --only-deps " .. "luasocket-3.0rc1-2." .. test_env.platform .. ".rock") | 87 | local output = run.luarocks("install --only-deps " .. "luasocket-3.0rc1-2." .. test_env.platform .. ".rock") |
88 | assert.are.same(output, "Successfully installed dependencies for luasocket 3.0rc1-2") | 88 | assert.are.same(output, "Successfully installed dependencies for luasocket 3.0rc1-2") |
89 | assert.is_true(os.remove("luasocket-3.0rc1-2." .. test_env.platform .. ".rock")) | 89 | assert.is_true(os.remove("luasocket-3.0rc1-2." .. test_env.platform .. ".rock")) |
90 | end) | 90 | end) |
91 | 91 | ||
92 | it("LuaRocks install reinstall", function() | 92 | it("LuaRocks install reinstall", function() |
93 | assert.is_true(run.luarocks_bool(test_env.quiet("build --pack-binary-rock luasocket 3.0rc1-2"))) | 93 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket 3.0rc1-2")) |
94 | assert.is_true(run.luarocks_bool("install " .. "luasocket-3.0rc1-2." .. test_env.platform .. ".rock")) | 94 | assert.is_true(run.luarocks_bool("install " .. "luasocket-3.0rc1-2." .. test_env.platform .. ".rock")) |
95 | assert.is_true(run.luarocks_bool("install --deps-mode=none " .. "luasocket-3.0rc1-2." .. test_env.platform .. ".rock")) | 95 | assert.is_true(run.luarocks_bool("install --deps-mode=none " .. "luasocket-3.0rc1-2." .. test_env.platform .. ".rock")) |
96 | assert.is_true(os.remove("luasocket-3.0rc1-2." .. test_env.platform .. ".rock")) | 96 | assert.is_true(os.remove("luasocket-3.0rc1-2." .. test_env.platform .. ".rock")) |
97 | end) | 97 | end) |
98 | 98 | ||
99 | it("LuaRocks install binary rock of cprint", function() | 99 | it("LuaRocks install binary rock of cprint", function() |
100 | assert.is_true(run.luarocks_bool(test_env.quiet("build --pack-binary-rock cprint"))) | 100 | assert.is_true(run.luarocks_bool("build --pack-binary-rock cprint")) |
101 | assert.is_true(run.luarocks_bool("install cprint-0.1-2." .. test_env.platform .. ".rock")) | 101 | assert.is_true(run.luarocks_bool("install cprint-0.1-2." .. test_env.platform .. ".rock")) |
102 | assert.is_true(os.remove("cprint-0.1-2." .. test_env.platform .. ".rock")) | 102 | assert.is_true(os.remove("cprint-0.1-2." .. test_env.platform .. ".rock")) |
103 | end) | 103 | end) |