Skip to content

Commit

Permalink
civi-test-run - XML validation should use new filenames
Browse files Browse the repository at this point in the history
With recent commits for phpunit10 support, we stopped using the files
like `E2E/AllTests.php`. This led to different names for the XML files
(`E2E_AllTests.xml` ==> `phpunit-e2e.xml`).
  • Loading branch information
totten committed Dec 17, 2024
1 parent f38fbd6 commit a5be3d2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bin/civi-test-run
Original file line number Diff line number Diff line change
Expand Up @@ -487,20 +487,20 @@ for TESTTYPE in $SUITES ; do
[ ! -f "$JUNITDIR/civicrm-upgrade-test.xml" ] && fatal "Missing XML: civicrm-upgrade-test.xml"
fi
if [ $TESTTYPE = "phpunit-crm" ] || [ $TESTTYPE = "all" ] ; then
[ ! -f "$JUNITDIR/CRM_AllTests.xml" ] && fatal "Missing XML: CRM_AllTests.xml"
[ ! -f "$JUNITDIR/phpunit-crm.xml" ] && fatal "Missing XML: phpunit-crm.xml"
fi
if [[ $TESTTYPE =~ ^(phpunit-crm-[1-9]|phpunit-api3-[1-9])$ ]]; then
## NOTE: These are NOT expected to run when TESTTYPE="all". Instead, "all" has the larger phpunit-crm and phpunit-api3 suites.
[ ! -f "$JUNITDIR/$TESTTYPE.xml" ] && fatal "Missing XML: $TESTTYPE.xml"
fi
if [ $TESTTYPE = "phpunit-api" ] || [ $TESTTYPE = "all" ] ; then
[ ! -f "$JUNITDIR/api_v3_AllTests.xml" ] && fatal "Missing XML: api_v3_AllTests.xml"
[ ! -f "$JUNITDIR/phpunit-api.xml" ] && fatal "Missing XML: phpunit-api.xml"
fi
if [ $TESTTYPE = "phpunit-api3" ] || [ $TESTTYPE = "all" ] ; then
[ ! -f "$JUNITDIR/api_v3_AllTests.xml" ] && fatal "Missing XML: api_v3_AllTests.xml"
[ ! -f "$JUNITDIR/phpunit-api3.xml" ] && fatal "Missing XML: phpunit-api3.xml"
fi
if [ $TESTTYPE = "phpunit-api4" ] || [ $TESTTYPE = "all" ] ; then
[ ! -f "$JUNITDIR/api_v4_AllTests.xml" ] && fatal "Missing XML: api_v4_AllTests.xml"
[ ! -f "$JUNITDIR/phpunit-api4.xml" ] && fatal "Missing XML: phpunit-api4.xml"
fi
if [ $TESTTYPE = "phpunit-drupal" ] ; then
[ ! -f "$JUNITDIR/phpunit_drupal.xml" ] && fatal "Missing XML: phpunit_drupal.xml"
Expand All @@ -512,10 +512,10 @@ for TESTTYPE in $SUITES ; do
[ ! -f "$JUNITDIR/phpunit_backdrop.xml" ] && fatal "Missing XML: phpunit_backdrop.xml"
fi
if [ $TESTTYPE = "phpunit-civi" ] || [ $TESTTYPE = "all" ] ; then
[ ! -f "$JUNITDIR/Civi\\AllTests.xml" ] && fatal "Missing XML: Civi\\AllTests.xml"
[ ! -f "$JUNITDIR/phpunit-civi.xml" ] && fatal "Missing XML: phpunit-civi.xml"
fi
if [ $TESTTYPE = "phpunit-e2e" ] || [ $TESTTYPE = "all" ] ; then
[ ! -f "$JUNITDIR/E2E_AllTests.xml" ] && fatal "Missing XML: E2E_AllTests.xml"
[ ! -f "$JUNITDIR/phpunit-e2e.xml" ] && fatal "Missing XML: phpunit-e2e.xml"
fi
if [ $TESTTYPE = "karma" ] || [ $TESTTYPE = "all" ] ; then
[ -d "$CIVI_CORE/tests/karma" -a ! -f "$JUNITDIR/karma.xml" ] && fatal "Missing XML: karma.xml"
Expand Down

0 comments on commit a5be3d2

Please sign in to comment.