aboutsummaryrefslogtreecommitdiff
path: root/spec/build_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/build_spec.lua')
-rw-r--r--spec/build_spec.lua36
1 files changed, 19 insertions, 17 deletions
diff --git a/spec/build_spec.lua b/spec/build_spec.lua
index 682c6dcf..2ede5211 100644
--- a/spec/build_spec.lua
+++ b/spec/build_spec.lua
@@ -57,7 +57,7 @@ describe("LuaRocks build tests #blackbox #b_build", function()
57 end) 57 end)
58 58
59 it("LuaRocks build lpeg verbose", function() 59 it("LuaRocks build lpeg verbose", function()
60 assert.is_true(run.luarocks_bool("build --verbose lpeg")) 60 assert.is.truthy(run.luarocks("build --verbose lpeg"))
61 end) 61 end)
62 62
63 it("LuaRocks build lpeg branch=master", function() 63 it("LuaRocks build lpeg branch=master", function()
@@ -82,9 +82,8 @@ describe("LuaRocks build tests #blackbox #b_build", function()
82 end) 82 end)
83 83
84 describe("LuaRocks build - basic builds", function() 84 describe("LuaRocks build - basic builds", function()
85
86 it("LuaRocks build luadoc", function() 85 it("LuaRocks build luadoc", function()
87 assert.is_true(run.luarocks_bool("build luadoc")) 86 assert.is_true(run.luarocks_bool(test_env.quiet("build luadoc")))
88 end) 87 end)
89 88
90 it("LuaRocks build luacov diff version", function() 89 it("LuaRocks build luacov diff version", function()
@@ -103,12 +102,12 @@ describe("LuaRocks build tests #blackbox #b_build", function()
103 end) 102 end)
104 103
105 it("LuaRocks build supported platforms lpty", function() 104 it("LuaRocks build supported platforms lpty", function()
106 assert.is_true(run.luarocks_bool("build lpty")) 105 assert.is_true(run.luarocks_bool(test_env.quiet("build lpty")))
107 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpty")) 106 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpty"))
108 end) 107 end)
109 108
110 it("LuaRocks build luasec with skipping dependency checks", function() 109 it("LuaRocks build luasec with skipping dependency checks", function()
111 assert.is_true(run.luarocks_bool("build luasec --nodeps")) 110 assert.is_true(run.luarocks_bool(test_env.quiet("build luasec --nodeps")))
112 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasec")) 111 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasec"))
113 end) 112 end)
114 113
@@ -119,31 +118,34 @@ describe("LuaRocks build tests #blackbox #b_build", function()
119 end) 118 end)
120 119
121 describe("LuaRocks build - more complex tests", function() 120 describe("LuaRocks build - more complex tests", function()
122 121 if test_env.TYPE_TEST_ENV == "full" then
123 it("LuaRocks build luacheck show downloads test_config", function() 122 it("LuaRocks build luacheck show downloads test_config", function()
124 local out = run.luarocks("build luacheck", { LUAROCKS_CONFIG = testing_paths.testing_dir .. "/testing_config_show_downloads.lua"} ) 123 local output = run.luarocks("build luacheck", { LUAROCKS_CONFIG = testing_paths.testing_dir .. "/testing_config_show_downloads.lua"} )
125 print(out) 124 assert.is.truthy(output:match("%.%.%."))
126 end) 125 end)
127 126 end
127
128 it("LuaRocks build luasec only deps", function() 128 it("LuaRocks build luasec only deps", function()
129 assert.is_true(run.luarocks_bool("build luasec --only-deps")) 129 assert.is_true(run.luarocks_bool(test_env.quiet("build luasec --only-deps")))
130 assert.is_false(run.luarocks_bool("show luasec")) 130 assert.is_false(run.luarocks_bool("show luasec"))
131 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasec")) 131 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasec"))
132 end) 132 end)
133 133
134 it("LuaRocks build only deps of downloaded rockspec of lxsh", function() 134 it("LuaRocks build only deps of downloaded rockspec of lxsh", function()
135 assert.is_true(run.luarocks_bool("download --rockspec lxsh 0.8.6-2")) 135 assert.is_true(run.luarocks_bool("download --rockspec lxsh 0.8.6-2"))
136 assert.is_true(run.luarocks_bool("build lxsh-0.8.6-2.rockspec --only-deps")) 136 assert.is.truthy(run.luarocks("build lxsh-0.8.6-2.rockspec --only-deps"))
137 assert.is_false(run.luarocks_bool("show lxsh")) 137 assert.is_false(run.luarocks_bool("show lxsh"))
138 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh")) 138 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh"))
139 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg"))
139 assert.is_true(os.remove("lxsh-0.8.6-2.rockspec")) 140 assert.is_true(os.remove("lxsh-0.8.6-2.rockspec"))
140 end) 141 end)
141 142
142 it("LuaRocks build only deps of downloaded rock of lxsh", function() 143 it("LuaRocks build only deps of downloaded rock of lxsh", function()
143 assert.is_true(run.luarocks_bool("download --source lxsh 0.8.6-2")) 144 assert.is_true(run.luarocks_bool("download --source lxsh 0.8.6-2"))
144 assert.is_true(run.luarocks_bool("build lxsh-0.8.6-2.src.rock --only-deps")) 145 assert.is.truthy(run.luarocks("build lxsh-0.8.6-2.src.rock --only-deps"))
145 assert.is_false(run.luarocks_bool("show lxsh")) 146 assert.is_false(run.luarocks_bool("show lxsh"))
146 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh")) 147 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh"))
148 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg"))
147 assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) 149 assert.is_true(os.remove("lxsh-0.8.6-2.src.rock"))
148 end) 150 end)
149 151
@@ -151,7 +153,7 @@ describe("LuaRocks build tests #blackbox #b_build", function()
151 assert.is_true(run.luarocks_bool("download --rockspec validate-args 1.5.4-1")) 153 assert.is_true(run.luarocks_bool("download --rockspec validate-args 1.5.4-1"))
152 assert.is_true(run.luarocks_bool("build validate-args-1.5.4-1.rockspec")) 154 assert.is_true(run.luarocks_bool("build validate-args-1.5.4-1.rockspec"))
153 155
154 assert.is_true(run.luarocks_bool("show validate-args")) 156 assert.is.truthy(run.luarocks("show validate-args"))
155 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/validate-args")) 157 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/validate-args"))
156 158
157 assert.is_true(os.remove("validate-args-1.5.4-1.rockspec")) 159 assert.is_true(os.remove("validate-args-1.5.4-1.rockspec"))
@@ -159,10 +161,10 @@ describe("LuaRocks build tests #blackbox #b_build", function()
159 161
160 it("LuaRocks build with https", function() 162 it("LuaRocks build with https", function()
161 assert.is_true(run.luarocks_bool("download --rockspec validate-args 1.5.4-1")) 163 assert.is_true(run.luarocks_bool("download --rockspec validate-args 1.5.4-1"))
162 assert.is_true(run.luarocks_bool("install luasec")) 164 assert.is_true(run.luarocks_bool(test_env.quiet("install luasec")))
163 assert.is_true(run.luarocks_bool("build validate-args-1.5.4-1.rockspec")) 165 assert.is_true(run.luarocks_bool("build validate-args-1.5.4-1.rockspec"))
164 166
165 assert.is_true(run.luarocks_bool("show validate-args")) 167 assert.is.truthy(run.luarocks("show validate-args"))
166 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/validate-args")) 168 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/validate-args"))
167 169
168 assert.is_true(os.remove("validate-args-1.5.4-1.rockspec")) 170 assert.is_true(os.remove("validate-args-1.5.4-1.rockspec"))