https://git.drupalcode.org/project/jsonapi_hypermedia/commit/6f9d50b caught my eye.

https://www.drupal.org/pift-ci-job/1407402 is indeed failing. This is what's happening:

00:03:08.824 cd /var/www/html && sudo MINK_DRIVER_ARGS_WEBDRIVER='["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless"]}}, "http://chromedriver-jenkins-drupal-contrib-44119:9515"]' -u www-data php /var/www/html/core/scripts/run-tests.sh --color --keep-results --suppress-deprecations --types "Simpletest,PHPUnit-Unit,PHPUnit-Kernel,PHPUnit-Functional" --concurrency "32" --repeat "1" --sqlite "/var/lib/drupalci/workdir/run_tests.standard/simpletest.sqlite" --dburl "mysql://drupaltestbot:drupaltestbotpw@172.18.0.4/jenkins_drupal_contrib_44119" --url "http://php-apache-jenkins-drupal-contrib-44119/subdirectory" --directory modules/contrib/jsonapi_hypermedia
00:03:09.153   ERROR: No valid tests were specified.

That error message originates from run-tests.sh. Running it locally yields the same result:

wim.leers at Acquia in ~/Work/d8 on 8.8.x*
$ php core/scripts/run-tests.sh --directory modules/jsonapi_hypermedia
  ERROR: No valid tests were specified.

So I enabled xdebug and stepped through it.

The root cause:

        // Extract all class names.
        // Abstract classes are excluded on purpose.
        preg_match_all('@^\s*class ([^ ]+)@m', $content, $matches);
        if (!$namespace) {
          $test_list = array_merge($test_list, $matches[1]);
        }

in run-tests.sh does not only filter out abstract test classes, but also final test classes… 🤦‍♂️🤯 And this has been known for a long time: #2913819: run-tests.sh ignores final classes. Surprisingly, zero follow-up on that issue. #2551981: Add --directory option to run-tests.sh test discovery introduced this bug.

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Status: Active » Needs review
StatusFileSize
new1.27 KB

Rather than waiting for #2913819-5: run-tests.sh ignores final classes to land, we should probably just remove final here…

wim leers’s picture

StatusFileSize
new906 bytes
new1.66 KB

Oh, there's an actual bug in the test coverage.

Status: Needs review » Needs work

The last submitted patch, 3: 3081705-3.patch, failed testing. View results

wim leers’s picture

Priority: Normal » Critical
Status: Needs work » Reviewed & tested by the community
Issue tags: +API-First Initiative

The remaining failures are because getLinkRelationType() doesn't exist yet: #3080259: Links with different target attributes are improperly merged has not yet been committed.

Still, this makes the tests run at all, which is the goal of this issue, so marking RTBC myself 😇

  • gabesullice committed d8f7e8f on 8.x-1.x authored by Wim Leers
    Issue #3081705 by Wim Leers: Make DrupalCI discover and run JSON:API...

wim leers’s picture

Status: Reviewed & tested by the community » Fixed
wim leers’s picture

Status: Fixed » Needs review
StatusFileSize
new1.26 KB

GOOD NEWS!

We managed to get #2913819: run-tests.sh ignores final classes fixed in both Drupal 8.8 and 8.7. Which means 2 of the 3 lines committed here can be reverted! 🥳

Status: Needs review » Needs work

The last submitted patch, 9: 3081705-9.patch, failed testing. View results

gabesullice’s picture

Status: Needs work » Reviewed & tested by the community

Thanks for following up @Wim Leers! This is RTBC afaic.

  • gabesullice committed f5fdbb9 on 8.x-1.x authored by Wim Leers
    Issue #3081705 by Wim Leers, gabesullice: Make DrupalCI discover and run...
gabesullice’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.