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 fa071299 authored by di68kap's avatar di68kap
Browse files

- Autor/Werk wieder getrennt

parent beb4bedc
...@@ -378,7 +378,7 @@ LOG_SIZE_THRESHOLD = 100000 # maximum number of history records to log ...@@ -378,7 +378,7 @@ LOG_SIZE_THRESHOLD = 100000 # maximum number of history records to log
LOG_TAIL_THRESHOLD = 500 # maximum number of history recors for "tail log" LOG_TAIL_THRESHOLD = 500 # maximum number of history recors for "tail log"
def log_parsing_history(grammar, log_file_name: str = '', html: bool=False) -> None: def log_parsing_history(grammar, log_file_name: str = '', html: bool=True) -> None:
""" """
Writes a log of the parsing history of the most recently parsed document. Writes a log of the parsing history of the most recently parsed document.
......
...@@ -298,13 +298,14 @@ def grammar_unit(test_unit, parser_factory, transformer_factory, report=True, ve ...@@ -298,13 +298,14 @@ def grammar_unit(test_unit, parser_factory, transformer_factory, report=True, ve
cst = parser(test_code, parser_name) cst = parser(test_code, parser_name)
except UnknownParserError as upe: except UnknownParserError as upe:
cst = Node(ZOMBIE_PARSER, "").add_error(str(upe)).init_pos(0) cst = Node(ZOMBIE_PARSER, "").add_error(str(upe)).init_pos(0)
log_ST(cst, "match_%s_%s.cst" % (parser_name, test_name)) clean_test_name = test_name.replace('*', '')
log_ST(cst, "match_%s_%s.cst" % (parser_name, clean_test_name))
tests.setdefault('__cst__', {})[test_name] = cst tests.setdefault('__cst__', {})[test_name] = cst
if "ast" in tests or report: if "ast" in tests or report:
ast = copy.deepcopy(cst) ast = copy.deepcopy(cst)
transform(ast) transform(ast)
tests.setdefault('__ast__', {})[test_name] = ast tests.setdefault('__ast__', {})[test_name] = ast
log_ST(ast, "match_%s_%s.ast" % (parser_name, test_name)) log_ST(ast, "match_%s_%s.ast" % (parser_name, clean_test_name))
if is_error(cst.error_flag): if is_error(cst.error_flag):
errors = adjust_error_locations(cst.collect_errors(), test_code) errors = adjust_error_locations(cst.collect_errors(), test_code)
errata.append('Match test "%s" for parser "%s" failed:\n\tExpr.: %s\n\n\t%s\n\n' % errata.append('Match test "%s" for parser "%s" failed:\n\tExpr.: %s\n\n\t%s\n\n' %
...@@ -313,7 +314,7 @@ def grammar_unit(test_unit, parser_factory, transformer_factory, report=True, ve ...@@ -313,7 +314,7 @@ def grammar_unit(test_unit, parser_factory, transformer_factory, report=True, ve
tests.setdefault('__err__', {})[test_name] = errata[-1] tests.setdefault('__err__', {})[test_name] = errata[-1]
# write parsing-history log only in case of failure! # write parsing-history log only in case of failure!
if is_logging(): if is_logging():
log_parsing_history(parser, "match_%s_%s.log" % (parser_name, test_name)) log_parsing_history(parser, "match_%s_%s.log" % (parser_name, clean_test_name))
elif "cst" in tests and mock_syntax_tree(tests["cst"][test_name]) != cst: elif "cst" in tests and mock_syntax_tree(tests["cst"][test_name]) != cst:
errata.append('Concrete syntax tree test "%s" for parser "%s" failed:\n%s' % errata.append('Concrete syntax tree test "%s" for parser "%s" failed:\n%s' %
(test_name, parser_name, cst.as_sxpr())) (test_name, parser_name, cst.as_sxpr()))
......
...@@ -592,7 +592,7 @@ def flatten(context: List[Node], condition: Callable=is_anonymous, recursive: bo ...@@ -592,7 +592,7 @@ def flatten(context: List[Node], condition: Callable=is_anonymous, recursive: bo
Applying flatten recursively will result in these kinds of Applying flatten recursively will result in these kinds of
structural transformation:: structural transformation::
(1 (+ 2) (+ 3) -> (1 + 2 + 3) (1 (+ 2) (+ 3)) -> (1 + 2 + 3)
(1 (+ (2 + (3)))) -> (1 + 2 + 3) (1 (+ (2 + (3)))) -> (1 + 2 + 3)
""" """
node = context[-1] node = context[-1]
......
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