From 2058668df8c4598359bed415fde4b61e72295c40 Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Sat, 7 Dec 2024 15:59:46 +0000 Subject: [PATCH] set timeout in cfg --- tests/filecheck/lit.cfg | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/filecheck/lit.cfg b/tests/filecheck/lit.cfg index 6d6a3bb..e17a969 100644 --- a/tests/filecheck/lit.cfg +++ b/tests/filecheck/lit.cfg @@ -6,3 +6,17 @@ config.test_source_root = os.path.dirname(__file__) config.name = "asl-xdsl" config.test_format = lit.formats.ShTest() config.suffixes = ['.asl', '.mlir'] + +# checking if maxIndividualTestTime is available on the platform and sets +# it to 20sec if so, declares lit-max-individual-test-time feature for +# further checking by tests. +supported, errormsg = lit_config.maxIndividualTestTimeIsSupported +if supported: + config.available_features.add("lit-max-individual-test-time") + lit_config.maxIndividualTestTime = 20 +else: + lit_config.warning( + "Setting a timeout per test not supported. " + + errormsg + + " Some tests will be skipped." + )