diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2014-11-26 16:52:47 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2014-11-26 16:52:47 -0200 |
commit | 8bbf02e239ad62248f1b13af6fbc93ff84469831 (patch) | |
tree | 85b0d90d313e85fa6d54baacd638e12d0285e5a2 /src | |
parent | 7a7c1245f89fc5c7fa4b6f4fe6b1dd7b5722a7e7 (diff) | |
download | luarocks-8bbf02e239ad62248f1b13af6fbc93ff84469831.tar.gz luarocks-8bbf02e239ad62248f1b13af6fbc93ff84469831.tar.bz2 luarocks-8bbf02e239ad62248f1b13af6fbc93ff84469831.zip |
Make test suite detect crashes on tests that should fail gracefully.
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/cfg.lua | 1 | ||||
-rw-r--r-- | src/luarocks/command_line.lua | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua index 9a992bae..2d02230b 100644 --- a/src/luarocks/cfg.lua +++ b/src/luarocks/cfg.lua | |||
@@ -44,6 +44,7 @@ cfg.errorcodes = setmetatable({ | |||
44 | OK = 0, | 44 | OK = 0, |
45 | UNSPECIFIED = 1, | 45 | UNSPECIFIED = 1, |
46 | PERMISSIONDENIED = 2, | 46 | PERMISSIONDENIED = 2, |
47 | CRASH = 99 | ||
47 | },{ | 48 | },{ |
48 | __index = function(t, key) | 49 | __index = function(t, key) |
49 | local val = rawget(t, key) | 50 | local val = rawget(t, key) |
diff --git a/src/luarocks/command_line.lua b/src/luarocks/command_line.lua index cc2e1683..15b036b0 100644 --- a/src/luarocks/command_line.lua +++ b/src/luarocks/command_line.lua | |||
@@ -208,7 +208,7 @@ function command_line.run_command(...) | |||
208 | local xp, ok, err, exitcode = xpcall(function() return cmd.run(unpack(args)) end, function(err) | 208 | local xp, ok, err, exitcode = xpcall(function() return cmd.run(unpack(args)) end, function(err) |
209 | die(debug.traceback("LuaRocks "..cfg.program_version | 209 | die(debug.traceback("LuaRocks "..cfg.program_version |
210 | .." bug (please report at luarocks-developers@lists.sourceforge.net).\n" | 210 | .." bug (please report at luarocks-developers@lists.sourceforge.net).\n" |
211 | ..err, 2)) | 211 | ..err, 2), cfg.errorcodes.CRASH) |
212 | end) | 212 | end) |
213 | if xp and (not ok) then | 213 | if xp and (not ok) then |
214 | die(err, exitcode) | 214 | die(err, exitcode) |