Make sure GCMole pukes when Clang invocation fails.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 17 Jun 2013 18:00:23 +0000 (18:00 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 17 Jun 2013 18:00:23 +0000 (18:00 +0000)
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/16878003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

tools/gcmole/gcmole.lua

index b259ee0..66aff94 100644 (file)
@@ -117,7 +117,8 @@ function InvokeClangPluginForEachFile(filenames, cfg, func)
       if FLAGS.verbose then print('popen ', action) end
       local pipe = io.popen(action)
       func(filename, pipe:lines())
-      pipe:close()
+      local success = pipe:close()
+      if not success then error("Failed to run: " .. action) end
    end
 end