Skip to content

Commit 98e2354

Browse files
LiedtkeV8-internal LUCI CQ
authored andcommitted
[tools] presubmit.py: Print actual diff on presubmit failure
Change-Id: I174dd958c7854b0fa59228085bd23fe01cdf1fa0 Reviewed-on: https://chrome-internal-review.googlesource.com/c/v8/fuzzilli/+/9032276 Commit-Queue: Matthias Liedtke <mliedtke@google.com> Reviewed-by: Michael Achenbach <machenbach@google.com> Auto-Submit: Matthias Liedtke <mliedtke@google.com>
1 parent 9f9c371 commit 98e2354

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Tools/presubmit.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ def check_git_clean():
2020
cwd=BASE_DIR,
2121
capture_output=True,
2222
check=True)
23-
assert result.stdout.decode().strip() == "", f"Unexpected modified files: {result.stdout.decode()}"
23+
output = result.stdout.decode().strip()
24+
if output != "":
25+
diff_result = subprocess.run(["git", "diff"], cwd=BASE_DIR, capture_output=True, check=True)
26+
assert False, f"Unexpected modified files: {output}\n== Diff ==\n{diff_result.stdout.decode()}"
2427

2528
def check_proto():
2629
"""Check that program.proto is up-to-date."""

0 commit comments

Comments
 (0)