diff --git a/jaclang/compiler/passes/main/import_pass.py b/jaclang/compiler/passes/main/import_pass.py index 64f726baa..3ee0637dd 100644 --- a/jaclang/compiler/passes/main/import_pass.py +++ b/jaclang/compiler/passes/main/import_pass.py @@ -13,6 +13,7 @@ import jaclang.compiler.absyntree as ast from jaclang.compiler.passes import Pass from jaclang.compiler.passes.main import SubNodeTabPass, SymTabBuildPass +from jaclang.settings import settings from jaclang.utils.log import logging @@ -105,7 +106,7 @@ def annex_impl(self, node: ast.Module) -> None: or test_folder == os.path.dirname(cur_file) ) and cur_file.endswith(".test.jac"): mod = self.import_jac_mod_from_file(cur_file) - if mod: + if mod and not settings.ignore_test_annex: node.test_mod.append(mod) node.add_kids_right([mod], pos_update=False) mod.parent = node diff --git a/jaclang/settings.py b/jaclang/settings.py index 7e40de855..8c64d71be 100644 --- a/jaclang/settings.py +++ b/jaclang/settings.py @@ -19,6 +19,7 @@ class Settings: # Compiler configuration diable_mtllm: bool = False + ignore_test_annex: bool = False # Formatter configuration max_line_length: int = 88