Skip to content

Commit b8aae7b

Browse files
committed
test-failure-policy: Ignore window. prefix for ph_* test helper functions
We will soon move cockpit's test-functions.js helpers to the `window` object, so that they become compatible with Webdriver's script preloading API. This affects all naughty patterns which include any of the `ph_*()` function calls (i.e. most patterns). Until this all lands and settles down, avoid mass-changing all the patterns and just remove the `window.` prefix for the comparison. Note that the naughties also apply to old project branches.
1 parent 0547757 commit b8aae7b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test-failure-policy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ def normalize_traceback(trace: str) -> str:
146146
trace = re.sub(r'audit\([0-9.:]+\)', 'audit(0)', trace)
147147
trace = re.sub(r'\b(pid|ino)=[0-9]+ ', r'\1=0 ', trace)
148148

149+
# testlib API change: move ph_*() test-functions to window object
150+
trace = re.sub(r'\bwindow.ph_', r'ph_', trace)
151+
149152
# in Python 3, testlib.Error is shown with namespace
150153
trace = re.sub(r'testlib\.Error', 'Error', trace)
151154
return trace

0 commit comments

Comments
 (0)