Skip to content

Commit

Permalink
TEST: Support reference testing for clang-AST
Browse files Browse the repository at this point in the history
  • Loading branch information
czgdp1807 committed Mar 13, 2024
1 parent 1e815e3 commit 9570bbb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def is_included(backend):
and (specific_backends is None or backend in specific_backends) \
and (excluded_backends is None or backend not in excluded_backends)
show_verbose = "" if not verbose else "-v"
clang_ast = is_included("clang_ast")
parse_all_comments = is_included("parse_all_comments")
ast = is_included("ast")
asr = is_included("asr")
asr_json = is_included("asr_json")
Expand All @@ -43,6 +45,19 @@ def is_included(backend):
else:
log.debug(f"{color(style.bold)} START TEST: {color(style.reset)} {filename}")

if clang_ast:
if parse_all_comments:
cmd = "lc --show-clang-ast --parse-all-comments {infile} -o {outfile}"
else:
cmd = "lc --show-clang-ast {infile} -o {outfile}"

run_test(
filename,
"clang_ast",
"lc --show-clang-ast --parse-all-comments {infile} -o {outfile}",
filename,
update_reference, extra_args)

if ast:
run_test(
filename,
Expand Down

0 comments on commit 9570bbb

Please sign in to comment.