Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 1eb02871 authored by di68kap's avatar di68kap
Browse files

- Fail tests of unknown parsers are now reported as failure!

parent e43fc882
......@@ -389,6 +389,8 @@ def grammar_unit(test_unit, parser_factory, transformer_factory, report=True, ve
except UnknownParserError as upe:
node = Node(ZOMBIE_PARSER, "").init_pos(0)
cst = RootNode(node).new_error(node, str(upe))
errata.append('Unknown parser {} in fail test {}!'.format(parser_name, test_name))
tests.setdefault('__err__', {})[test_name] = errata[-1]
if not is_error(cst.error_flag):
errata.append('Fail test "%s" for parser "%s" yields match instead of '
'expected failure!' % (test_name, parser_name))
......
......@@ -214,7 +214,7 @@ class TestGrammarTest:
trans_fac = lambda : ARITHMETIC_EBNFTransform
# reset_unit(self.cases)
errata = grammar_unit(self.cases, parser_fac, trans_fac)
assert not errata, str(errata)
assert errata, "Unknown parser, but no error message!?"
report = get_report(self.cases)
assert report.find('### CST') >= 0
errata = grammar_unit(self.failure_cases, parser_fac, trans_fac)
......@@ -231,6 +231,17 @@ class TestGrammarTest:
# report = get_report(self.cases)
# assert report.find('### CST') >= 0
def test_fail_failtest(self):
"""Failure test should not pass if it failed because the parser is unknown."""
fcases = {}
fcases['berm'] = {}
fcases['berm']['fail'] = self.failure_cases['term']['fail']
errata = grammar_unit(fcases,
grammar_provider(ARITHMETIC_EBNF),
lambda : ARITHMETIC_EBNFTransform)
assert errata
class TestSExpr:
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment