The help text which run-tests.sh outputs contains an example of how to invoke the script without a working database or settings.php
$ php core/scripts/run-tests.sh | tail -n8
Without a preinstalled Drupal site and enabled Simpletest module, specify a
SQLite database pathname to create and the default database connection info to
use in tests:
sudo -u [wwwrun|www-data|etc] php ./core/scripts/run-tests.sh
--sqlite /tmpfs/drupal/test.sqlite
--dburl mysql://username:password@localhost/database
--url http://example.com/ --all
However, it could be made a little clearer that the sqlite db here is for the test runner, and the mysql db is for Drupal.
Comments
Comment #2
mcdruid commentedComment #3
ricardoamaro commentedThis is what we used to have:
# --dburl is the effective database connection that is being used for all tests. Can be any database driver supported by core
# --sqlite database is used for the test runner only (and only contains the simpletest module database schema)
#Example: php ./core/scripts/run-tests.sh --sqlite /tmpfs/drupal/test.sqlite --dburl mysql://username:password@localhost/database --url http://example.com/ --all
Comment #4
mcdruid commentedThanks Ricardo. I think I misunderstood what the example illustrates - it is possible to use sqlite as Drupal's db (as well as for the test runner), but that's not a very typical configuration (and it looks like it's not unusual for several tests to fail with sqlite as the db).
Here's a new patch which reverts the change (dburl back to mysql) and adds a few extra words to the explanation of the example to clarify the purpose of the two different database settings.
Comment #5
mcdruid commentedComment #6
mcdruid commentedComment #16
joachim commentedI don't really understand either the old or the new wording in this patch, because in the example command below, there is only one database argument, but the text talks about two things.
Comment #20
wim leers#1808220: Remove run-tests.sh dependency on existing/installed parent site introduced this.
Comment #23
quietone commentedMade an MR from the latest patch. The text reads well to me. I am not sure what @joachim saw, but the example after this text has used both the --sqlite and --dburl parameters since 2014.
Comment #24
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request. Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
Comment #25
quietone commentedComment #26
smustgrave commentedAlso agree update reads fine, see no issue.
Comment #29
nod_Committed 4c3ce18 and pushed to 11.x. Thanks!