Skip to content

Commit 4031f01

Browse files
committed
Use xmllint to query the XML.
1 parent c847ae2 commit 4031f01

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/scripts/extract-skipped-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ for file in phpunit-results-*.xml; do
3232
fi
3333

3434
# Extract skipped tests in class::method format
35-
SKIPPED_TESTS=$(xmllint --format "$file" 2>/dev/null | grep -B1 "<skipped" | grep "testcase" | sed -n 's/.*name="\([^"]*\)".*class="\([^"]*\)".*/\2::\1/p' || true)
35+
# Use xmllint to query the XML directly for skipped testcases
36+
SKIPPED_TESTS=$(xmllint --xpath "//testcase[skipped]" "$file" 2>/dev/null | sed -n 's/.*name="\([^"]*\)".*class="\([^"]*\)".*/\2::\1/p' || true)
3637

3738
echo "DEBUG: Extracted skipped tests: '$SKIPPED_TESTS'"
3839

0 commit comments

Comments
 (0)