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.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3081705-9.patch | 1.26 KB | wim leers |
| #3 | 3081705-3.patch | 1.66 KB | wim leers |
| #3 | interdiff.txt | 906 bytes | wim leers |
| #2 | 3081705-2.patch | 1.27 KB | wim leers |
Comments
Comment #2
wim leersRather than waiting for #2913819-5: run-tests.sh ignores final classes to land, we should probably just remove
finalhere…Comment #3
wim leersOh, there's an actual bug in the test coverage.
Comment #5
wim leersThe 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 😇
Comment #8
wim leersComment #9
wim leersGOOD 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! 🥳
Comment #11
gabesulliceThanks for following up @Wim Leers! This is RTBC afaic.
Comment #13
gabesullice