Problem/Motivation
Right now, we are using --sqlite :memory: to store test results in throwaway CI environments.
In the past, the --sqlite option was necessary to pass data between different sub-processes, but since #3515347: Reduce run-tests.sh complexity in spawning subprocesses all data is available to the master process so it's no longer necessary persisting it, hence we started using :memory: for the SQLite test runner database. Right now, not specifying --sqlite means test results are stored to the installed Drupal database (remnant of simpletest times, when a testing UI was provided for test reporting).
Proposed resolution
Make so that if no --sqlite option is passed, test results are stored in an in-memory alternative implementation of TestRunResultsStorageInterface. This is dropping dependency from SQLite and avoid db roundtrips on behalf of an all-PHP implementation.
Introduce a --results-on-installed-db CLI option, alternative to --sqlite, that can be used to store results in the installed db (which is something that was discouraged time ago, anyway).
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3570465
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3570465-experiment
changes, plain diff MR !15687
- 3570465-run-tests.sh---introduce
changes, plain diff MR !14554
Comments
Comment #3
mondrakeComment #4
mondrakeComment #5
mondrakeComment #6
mondrakeComment #7
mondrakeComment #10
smustgrave commentedRecommended way to test this one?
Comment #11
mondrake#10 compare the raw output of the jobs of this MR pipelines to the one of HEAD pipelines. Must be the same.
Comment #12
smustgrave commentedOkay ran the SQL lite here https://git.drupalcode.org/issue/drupal-3570465/-/pipelines/853108
And appears to be same as main if I’m reading it right.
So assuming it’s good? Will mark so it’s not sitting for 3 months again though
Comment #14
catchCommitted/pushed to main, thanks!
This doesn't cherry-pick cleanly to 11.x but not entirely sure it needs to, please re-open for backport if you think it should, but otherwise marking fixed.