GenerateThemeTest.php is unstable

Created on 5 December 2022, about 2 years ago
Updated 18 January 2024, about 1 year ago

Problem/Motivation

Trying to add Drupal to PHP tests (unit and build suites) I'm getting following error (see Test Drupal) https://github.com/php/php-src/actions/runs/3619347838/jobs/6100285224

1) Drupal\Tests\Core\Command\GenerateThemeTest::testContribStarterkitDevSnapshotWithGitNotInstalled
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
Error: R] The source theme starterkit_theme has a development version number     \n
-         (7.x-dev). Determining a specific commit is not possible because git is\n
-         not installed. Either install git or use a tagged release to generate a\n
-         theme.'
+'The source theme starterkit_theme has a development version number (7.x-dev). Because it is not a git checkout, a specific commit could not be identified. This makes tracking changes in the source theme difficult. Are you sure you want to continue? (yes/no) [yes]:\n
+ > Theme generated successfully to themes/test_custom_theme'

/home/runner/work/php-src/php-src/drupal/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php:96
/home/runner/work/php-src/php-src/drupal/core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php:274
/home/runner/work/php-src/php-src/drupal/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
/home/runner/work/php-src/php-src/drupal/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
/home/runner/work/php-src/php-src/drupal/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
/home/runner/work/php-src/php-src/drupal/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
/home/runner/work/php-src/php-src/drupal/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
/home/runner/work/php-src/php-src/drupal/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:661
/home/runner/work/php-src/php-src/drupal/vendor/phpunit/phpunit/src/TextUI/Command.php:144
/home/runner/work/php-src/php-src/drupal/vendor/phpunit/phpunit/src/TextUI/Command.php:97

Steps to reproduce

run locally SIMPLETEST_DB=sqlite://localhost/db.sqlite time vendor/bin/phpunit -c core/phpunit.xml.dist core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php

Proposed resolution

find out why it fails

Remaining tasks

- fix

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Postponed: needs info

Version

11.0 🔥

Component
PHPUnit 

Last updated 4 days ago

Created by

🇫🇷France andypost

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States dww

    This came up as a random daily triage target for #bugsmash.

    I just ran that test locally on a 10.1.x dev site and it passed:

    ./vendor/bin/phpunit -c core/phpunit.xml core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php
    PHPUnit 9.6.8 by Sebastian Bergmann and contributors.
    
    Testing Drupal\Tests\Core\Command\GenerateThemeTest
    .........                                                           9 / 9 (100%)
    
    Time: 04:34.894, Memory: 36.50 MB
    
    OK (9 tests, 55 assertions)
    

    Hoping that @andypost can confirm if this is still a bug we need to smash or not. 😅

  • 🇫🇷France andypost

    Probably the test was fixed, gonna try it again at github

  • Status changed to Closed: cannot reproduce 5 months ago
  • 🇫🇷France andypost

    proper status, we can re-open if it will fire again

Production build 0.71.5 2024