Skip to content

Commit 9d24e01

Browse files
committed
Merge remote-tracking branch 'origin/master' into refactor/derived-types
2 parents 0f5f94d + 3538585 commit 9d24e01

2 files changed

Lines changed: 33 additions & 22 deletions

File tree

toolchain/mfc/test/test.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,23 @@ def __filter(cases_) -> typing.Tuple[typing.List[TestCase], typing.List[TestCase
112112
raise MFCException(f"--only filter matched zero test cases. Specified: {ARG('only')}. Check that UUIDs/names are valid.")
113113

114114
# Convergence cases are slow (multiple resolutions × MPI ranks). Skip
115-
# by default unless the user explicitly opted in via --only "Convergence"
116-
# or a convergence UUID. _filter_only above has already narrowed cases
117-
# to the user's selection, so any convergence case still present here
118-
# was selected on purpose. Listing (`-l`) shows all cases regardless.
119-
if not ARG("only") and not ARG("list"):
120-
convergence_cases = [c for c in cases if getattr(c, "kind", "golden") == "convergence"]
121-
if convergence_cases:
115+
# unless the user explicitly opted in via --only "Convergence" or a
116+
# specific convergence UUID. A label like --only "2D" must not
117+
# accidentally pull in "Convergence -> 2D -> ..." cases.
118+
if not ARG("list"):
119+
120+
def is_uuid(term):
121+
return len(term) == 8 and all(c in "0123456789abcdefABCDEF" for c in term)
122+
123+
only_terms = ARG("only")
124+
only_labels = [t for t in only_terms if not is_uuid(t)]
125+
only_uuids = [t for t in only_terms if is_uuid(t)]
126+
127+
convergence_uuids = {c.get_uuid() for c in cases if getattr(c, "kind", "golden") == "convergence"}
128+
user_wants_convergence = "Convergence" in only_labels or any(u in convergence_uuids for u in only_uuids)
129+
130+
if not user_wants_convergence:
131+
convergence_cases = [c for c in cases if getattr(c, "kind", "golden") == "convergence"]
122132
for c in convergence_cases:
123133
cases.remove(c)
124134
skipped_cases.append(c)
Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
--- a/fypp.py
2-
+++ b/fypp.py
3-
@@ -1842,11 +1842,16 @@ class _Renderer:
4-
if self._linenums:
5-
# Last line was folded, but no linenums were generated for
6-
# the continuation lines -> current line position is not
7-
# in sync with the one calculated from the last line number
8-
unsync = (
9-
len(foldedlines) and len(foldedlines[-1]) > 1
1+
--- a/fypp.py 2026-05-14 19:44:34.158817311 -0400
2+
+++ b/fypp.py 2026-05-14 19:44:34.188817564 -0400
3+
@@ -1848,12 +1848,17 @@
104
and not self._contlinenums)
115
# Eval directive in source consists of more than one line
126
multiline = span[1] - span[0] > 1
137
- if unsync or multiline:
8+
- # For inline eval directives span[0] == span[1]
9+
- # -> next line is span[0] + 1 and not span[1] as for
10+
- # line eval directives
11+
- nextline = max(span[1], span[0] + 1)
12+
- trailing += self._linenumdir(nextline, fname)
1413
+ # Always emit a resync marker after a $: call. Without this,
1514
+ # single-line $: calls that expand to multi-line #if/#endif
1615
+ # blocks (e.g. GPU_PARALLEL_LOOP) cause the compiler to
1716
+ # attribute the next Fortran statement to the call-site line
1817
+ # rather than the following source line, producing off-by-1
1918
+ # errors in backtraces and debugger line info.
20-
+ if unsync or multiline or True:
21-
# For inline eval directives span[0] == span[1]
22-
# -> next line is span[0] + 1 and not span[1] as for
23-
# line eval directives
24-
nextline = max(span[1], span[0] + 1)
25-
trailing += self._linenumdir(nextline, fname)
19+
+ # For inline eval directives span[0] == span[1]
20+
+ # -> next line is span[0] + 1 and not span[1] as for
21+
+ # line eval directives
22+
+ nextline = max(span[1], span[0] + 1)
23+
+ trailing += self._linenumdir(nextline, fname)
24+
else:
25+
trailing = ''
26+
return result + trailing

0 commit comments

Comments
 (0)