diff --git a/libcxx/test/support/test.support/type_algorithms.pass.cpp b/libcxx/test/support/test.support/type_algorithms.pass.cpp index cf6144d1cb04f..4a76f58f879af 100644 --- a/libcxx/test/support/test.support/type_algorithms.pass.cpp +++ b/libcxx/test/support/test.support/type_algorithms.pass.cpp @@ -13,6 +13,12 @@ #include "test_macros.h" #include "type_algorithms.h" +int some_file( void ) { + + return 1+2; // three! + +} + // concatenate static_assert(std::is_same >, types::type_list<> >::value, ""); static_assert(std::is_same >, types::type_list >::value, ""); diff --git a/llvm/utils/git/code-format-helper.py b/llvm/utils/git/code-format-helper.py index c45bb4d935d47..db2d4c5c52273 100644 --- a/llvm/utils/git/code-format-helper.py +++ b/llvm/utils/git/code-format-helper.py @@ -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) @@ -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) diff --git a/llvm/utils/git/test3.cpp b/llvm/utils/git/test3.cpp new file mode 100644 index 0000000000000..bec7d2853956b --- /dev/null +++ b/llvm/utils/git/test3.cpp @@ -0,0 +1,5 @@ +int three() { + if (code) { + return 1 + 2; + } +} \ No newline at end of file diff --git a/llvm/utils/git/test3.py b/llvm/utils/git/test3.py new file mode 100644 index 0000000000000..059c5a7f95d10 --- /dev/null +++ b/llvm/utils/git/test3.py @@ -0,0 +1,4 @@ +import sys + +if __name__ == "__main__": + sys.exit(42)