Alexey Serbin has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/7989

Change subject: [iwyu_tool.py] fix on the IWYU tool invocation
......................................................................

[iwyu_tool.py] fix on the IWYU tool invocation

Fixed the way how the include-what-you-use binary is invoked by the
iwyu_tool.py wrapper script.  Prior to this fix, the subprocess.Popen()
had the 'shell' argument set to 'True', so any issue with starting
the binary was silenced because there would be no OSError exception
raised.  Overall, if using 'shell=True' for subprocess.Popen(),
it wouldn't be feasible to detect that sort of errors via examining
the exit code of the started process because the include-what-you-use
binary always returns exit code 1 regardless of its findings.

I also updated the iwyu.sh script to be more robust in handling
possible errors, if any.

Prior to this fix, the 'iwyu' CMake target returned success if the
include-what-you-use binary was not in place.  E.g., Todd recently
found that running 'ninja iwyu' reported no errors when the
include-what-you-use tool was not present.  The same behavior was
observed with 'make iwyu' as well.  This patch fixes that problem
and introduces more robust handling of other possible issues while
working with the include-what-you-use tool.

Change-Id: Ifa4284857583fff6543f65a9c2a71a9e445f39e2
---
M build-support/iwyu/iwyu.sh
M build-support/iwyu/iwyu_tool.py
2 files changed, 24 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/89/7989/1
-- 
To view, visit http://gerrit.cloudera.org:8080/7989
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa4284857583fff6543f65a9c2a71a9e445f39e2
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <[email protected]>

Reply via email to