Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Allow the command line test runner to run all tests but not phpunit tests.
Proposed resolution
Add a new --all-simpletest command argument.
Remaining tasks
None.
User interface changes
Users are able to run only simpletest tests by adding --all-simpletest
argument to the command line.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#23 | 2567029-reroll-21.patch | 1.11 KB | gnuget |
#21 | interdiff.txt | 846 bytes | claudiu.cristea |
#21 | 2567029-21.patch | 1.16 KB | claudiu.cristea |
Comments
Comment #2
dawehnerAt that point I'm actually not 100% sure whether we need that. Wouldn't it be enough to run phpunit tests twice, given how fast they are?
Comment #3
MixologicThey're fast, but not that fast - about 4-5 minutes parallelized which adds up to real money spent on ec2. Plus there'd be the issue of double output, number of failing tests reported, etc. (of the ~13000 tests, phpunit is ~8000 of them). This would be valuable to us.
Comment #4
Fabianx CreditAttribution: Fabianx as a volunteer commented+1 to this change, drupal_ti users also had talked about this change.
As phpunit (in testsuite unit) never asks the DB I think this also means that we could run phpunit tests in a process and then simpletest in another.
But that means that for Postgres, SQL lite, etc. we don't need to re-run all the unit tests, which feels like a win to me :).
Comment #5
jibranIs this true for Functional and Kernel group as well?
Comment #6
dawehnerWell, technically running the unit tests for all databases is maybe a tiny tiny bit of the actual execution time of all tests. But sure, not the worst idea.
Nope, those need the DB, of course, but still, they can be executed via phpunit itself already.
Comment #8
dawehnerLet's see what happens when the file is reuploaded
Comment #11
dawehnerResolved the conflict.
Comment #12
MixologicThis causes a "unknown argument --skip-phpunit" when its added to an command line invocation. Hopefully this is all thats needed to fix it.
Comment #14
dawehnerAlexpott asked for a positive option.
Comment #18
MixologicI added that second test and ran it with the --all-simpletests option, and again, like before, drupalci wasnt finding any results in the database, primarily because I was overwriting the default --keep-results option. Re-running it now with that there. we should see the thinner results this time.
Comment #19
MixologicThat second test has now completed (https://www.drupal.org/pift-ci-job/50741). However It seems like the PHPUnit tests are still being ran.
Comment #20
Fabianx CreditAttribution: Fabianx as a volunteer commented-simpletest vs. -simpletests
Comment #21
claudiu.cristeaI would say all-simpletest because they are not simpletests, they are tests of type "simpletest" :-)
Updated IS and title per #14.
Comment #22
dawehnerAgreed with using singular, its too confusing to use the other alternative.
Comment #23
gnugetThis patch needed a reroll, I just did it.
There weren't conflicts, when I rebase it I got a
Auto-merging core/scripts/run-tests.sh
.Reroll attached.
Comment #25
dawehnerWe can use
now