diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2019-06-21 14:37:39 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2019-06-21 14:37:39 +0000 |
commit | 60294f9d3547e270f7adf9e5972138edbb625966 (patch) | |
tree | ba52576fc2d8b9530fefef4dadaf491a26207112 /clang/test/AST/gen_ast_dump_json_test.py | |
parent | 3503d84ae0f614a26d4ad0534f2b61c38f3cde1c (diff) | |
download | bcm5719-llvm-60294f9d3547e270f7adf9e5972138edbb625966.tar.gz bcm5719-llvm-60294f9d3547e270f7adf9e5972138edbb625966.zip |
Add an automated note to files produced by gen_ast_dump_json_test.py.
This also details what filters, if any, were used to generate the test output. Updates all the current JSON testing files to include the automated note.
llvm-svn: 364055
Diffstat (limited to 'clang/test/AST/gen_ast_dump_json_test.py')
-rw-r--r-- | clang/test/AST/gen_ast_dump_json_test.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/AST/gen_ast_dump_json_test.py b/clang/test/AST/gen_ast_dump_json_test.py index a7b98776de9..975039ead27 100644 --- a/clang/test/AST/gen_ast_dump_json_test.py +++ b/clang/test/AST/gen_ast_dump_json_test.py @@ -78,6 +78,12 @@ def main(): options = args.opts.split(' ') filters = Set(args.filters.split(',')) if args.filters else Set([]) + note = "// NOTE: CHECK lines have been autogenerated by " \ + "gen_ast_dump_json_test.py" + + if (args.filters): + note += "\n// using --filters=" + args.filters + cmd = [clang_binary, "-cc1"] cmd.extend(options) @@ -118,6 +124,7 @@ def main(): print("Writing json appended source file to %s." %(dest_path)) copyfile(args.source, dest_path) with open(dest_path, "a") as f: + f.write("\n" + note + "\n") for out_ast in out_asts: append_str = json.dumps(out_ast, indent=1, ensure_ascii=False) out_str = '\n\n' |