Skip to content

Commit afd3527

Browse files
committed
take into account possible newlines in test_run_shell_cmd_fail
1 parent cce1258 commit afd3527

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

test/framework/run.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,10 @@ def handler(signum, _):
495495
r"\s+full command\s* -> kill -9 \$\$",
496496
r"\s+exit code\s* -> -9",
497497
r"\s+working directory\s* -> " + work_dir,
498-
r"\s+called from\s* -> 'test_run_shell_cmd_fail' function in .*/test/.*/run.py \(line [0-9]+\)",
499-
r"\s+output \(stdout \+ stderr\)\s* -> .*/run-shell-cmd-output/kill-.*/out.txt",
500-
r"\s+interactive shell script\s* -> .*/run-shell-cmd-output/kill-.*/cmd.sh",
498+
r"\s+called from\s* -> 'test_run_shell_cmd_fail' function in "
499+
r"(.|\n)*/test/(.|\n)*/run.py \(line [0-9]+\)",
500+
r"\s+output \(stdout \+ stderr\)\s* -> (.|\n)*/run-shell-cmd-output/kill-(.|\n)*/out.txt",
501+
r"\s+interactive shell script\s* -> (.|\n)*/run-shell-cmd-output/kill-(.|\n)*/cmd.sh",
501502
]
502503
for pattern in patterns:
503504
regex = re.compile(pattern, re.M)
@@ -531,10 +532,11 @@ def handler(signum, _):
531532
r"\s+full command\s+ -> kill -9 \$\$",
532533
r"\s+exit code\s+ -> -9",
533534
r"\s+working directory\s+ -> " + work_dir,
534-
r"\s+called from\s+ -> 'test_run_shell_cmd_fail' function in .*/test/.*/run.py \(line [0-9]+\)",
535-
r"\s+output \(stdout\)\s+ -> .*/run-shell-cmd-output/kill-.*/out.txt",
536-
r"\s+error/warnings \(stderr\)\s+ -> .*/run-shell-cmd-output/kill-.*/err.txt",
537-
r"\s+interactive shell script\s* -> .*/run-shell-cmd-output/kill-.*/cmd.sh",
535+
r"\s+called from\s+ -> 'test_run_shell_cmd_fail' function in "
536+
r"(.|\n)*/test/(.|\n)*/run.py \(line [0-9]+\)",
537+
r"\s+output \(stdout\)\s+ -> (.|\n)*/run-shell-cmd-output/kill-(.|\n)*/out.txt",
538+
r"\s+error/warnings \(stderr\)\s+ -> (.|\n)*/run-shell-cmd-output/kill-(.|\n)*/err.txt",
539+
r"\s+interactive shell script\s* -> (.|\n)*/run-shell-cmd-output/kill-(.|\n)*/cmd.sh",
538540
]
539541
for pattern in patterns:
540542
regex = re.compile(pattern, re.M)

0 commit comments

Comments
 (0)