From 9570bbbcd158080a158c53f9386a2187cc267e66 Mon Sep 17 00:00:00 2001 From: Gagandeep Singh Date: Wed, 13 Mar 2024 16:11:10 +0530 Subject: [PATCH] TEST: Support reference testing for clang-AST --- run_tests.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/run_tests.py b/run_tests.py index f824719..7e843fb 100755 --- a/run_tests.py +++ b/run_tests.py @@ -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") @@ -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,