Alexey Serbin has submitted this change and it was merged. Change subject: [iwyu_tool.py] fix on the IWYU tool invocation ......................................................................
[iwyu_tool.py] fix on the IWYU tool invocation Fixed the way include-what-you-use binary is invoked by the iwyu_tool.py wrapper script. Prior to this fix, 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 error via examining the exit code of the started process because include-what-you-use 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 include-what-you-use binary was not in place. 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 Reviewed-on: http://gerrit.cloudera.org:8080/7989 Reviewed-by: Alexey Serbin <[email protected]> Tested-by: Alexey Serbin <[email protected]> --- M build-support/iwyu/iwyu.sh M build-support/iwyu/iwyu_tool.py 2 files changed, 30 insertions(+), 16 deletions(-) Approvals: Alexey Serbin: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/7989 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa4284857583fff6543f65a9c2a71a9e445f39e2 Gerrit-PatchSet: 5 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Todd Lipcon <[email protected]>
