Skip to content

Commit bded228

Browse files
rhoerrmage-os-ci
andauthored
fix(workflows): also exclude *AbstractTest.php suffix from Mage-OS suite (#374)
* fix(workflows): exclude abstract test base classes from Mage-OS suite PHPUnit 12 treats discovered Abstract*Test.php files as runner warnings, which the integration job interprets as exit code 1 even when all concrete tests pass. Generate <exclude> entries for any Abstract*Test.php inside the included shards. Also fix unescaped backticks in the trailing echo so bash no longer logs "integrationIgnore: command not found". * fix(workflows): also exclude *AbstractTest.php suffix form Prior commit only matched Abstract*Test.php prefix; upstream Magento also ships abstract bases with the suffix form (PaypalExpressAbstractTest, EntityAbstractTest, EavAbstractTest, etc.), which still trip PHPUnit 12 runner warnings and turn shards red. --------- Co-authored-by: Mage-OS <100189073+mage-os-ci@users.noreply.github.com>
1 parent eeb9ac2 commit bded228

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/full-integration-tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ jobs:
236236
done
237237
echo " <exclude>testsuite/Magento/IntegrationTest.php</exclude>"
238238
# PHPUnit 12 treats abstract test classes discovered via <directory> as runner
239-
# warnings (exit 1). Exclude any Abstract*Test.php files inside the included
240-
# shards so only concrete tests load.
239+
# warnings (exit 1). Exclude any Abstract*Test.php or *AbstractTest.php files
240+
# inside the included shards so only concrete tests load.
241241
IFS=','
242242
for dir in $DIRS; do
243243
dir="${dir#"${dir%%[![:space:]]*}"}"
@@ -246,7 +246,7 @@ jobs:
246246
*.php) continue ;;
247247
esac
248248
if [ -d "$dir" ]; then
249-
find "$dir" -type f -name 'Abstract*Test.php' -print | while read -r abs_test; do
249+
find "$dir" -type f \( -name 'Abstract*Test.php' -o -name '*AbstractTest.php' \) -print | while read -r abs_test; do
250250
echo " <exclude>$abs_test</exclude>"
251251
done
252252
fi

0 commit comments

Comments
 (0)