Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions llvm/utils/git/code-format-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ def format_run(
args.end_rev,
"--",
] + cpp_files

# For manual testing purposes...
if "INDUCE_FAILURE_IN_FORMATTER" in " ".join(cpp_files):
cf_cmd.insert(1, "--induce-failure")

print(f"Running: {' '.join(cf_cmd)}")
self.cf_cmd = cf_cmd
proc = subprocess.run(cf_cmd, capture_output=True)
Expand Down Expand Up @@ -192,6 +197,11 @@ def format_run(
"-r",
f"{args.start_rev}..{args.end_rev}",
] + py_files

# For manual testing purposes...
if "INDUCE_FAILURE_IN_FORMATTER" in " ".join(py_files):
darker_cmd += ["--induce-failure"]

print(f"Running: {' '.join(darker_cmd)}")
self.darker_cmd = darker_cmd
proc = subprocess.run(darker_cmd, capture_output=True)
Expand Down
3 changes: 3 additions & 0 deletions llvm/utils/git/test1.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int main() {
return 42;
}
2 changes: 2 additions & 0 deletions llvm/utils/git/test1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def main():
return 42