Problem/Motivation
In order to support two kind of jobs (one with javascript tests, one without), the plan is to execute run-tests.sh twice in a row with different parameters
To make the result parsing as easy as possible, the testbot currently uses the sqlite database. Sadly by default run-tests.sh cleans up the existing one
Proposed resolution
Add a boolean flag to keep the results table.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 2680057-16.patch | 2.23 KB | alexpott |
| #16 | 13-16-interdiff.txt | 562 bytes | alexpott |
| #13 | 2680057-14.patch | 2.22 KB | alexpott |
| #13 | 10-14-interdiff.txt | 1.01 KB | alexpott |
| #10 | 2680057-10.patch | 1.77 KB | alexpott |
Comments
Comment #2
dawehnerThere we go
Comment #3
isntall commentedIn my manual testing this patch works.
Though if there is no existing sqlite db, an error is thrown
ERROR: Missing Simpletest database schema. Either install Simpletest module or use the --sqlite parameter.even though the --sqlite flag is present
This might not be an issue, but the error is miss leading.
The command i used to run the test.
cd /var/www/html && sudo -u www-data /opt/phpenv/shims/php /var/www/html/core/scripts/run-tests.sh --url http://localhost/checkout --dburl mysql://drupaltestbot:drupaltestbotpw@drupaltestbot-db-mysql-5-5/simpletest_1457380647 --color --keep-results --concurrency 1 --keep-results-table --sqlite /var/www/html/results/simpletest.sqlite --types PHPUnit-FunctionalJavascript --allComment #4
dawehnerGood point. What about this then?
Comment #6
MixologicSomething fishy going on here
Comment #7
dawehnerAt was actually just 11pm, one is getting old.
Comment #8
dawehnerComment #9
Mixologicyay. This is looking good.
Comment #10
alexpottWe can achieve the same with slightly less duplication and complexity...
Comment #11
dawehnerAs said on IRC, we could truncate() the table and then not set
$table_exists = FALSEComment #12
alexpott@Mixologic pointed out that @isntall had also worked on a version of the patch but @dawehner was just quicker... ticking the credit box for @isntall.
Comment #13
alexpott@dawehner - yep it is prettier...
Comment #14
dawehnerPerfect
Comment #15
alexpottMissing ->execute() :)
Comment #16
alexpottFixed and started some db testing of truncate over in #2684359: The truncate method is does different things on different databases and depending if in a transaction
Comment #17
isntall commentedThis looks good, and behaves correctly.
My concern from comment #3 have been addressed.
Comment #18
jibranPatch looks fine just on nit.
Can we add a comment above this line to explain the situation?
Comment #19
dawehnerIMHO the code is pretty selfdescriptive already. If we don't want to keep the table and the table exists, we truncate it.
Comment #20
MixologicFYI: this is still a blocker to being able to commit the changes to drupalci.
Comment #21
alexpottGiven that this is for non-runtime code and for DrupalCI and optional too boot I'm happy to commit this to unblock frontend testing on DrupalCI. Committed 5e42677 and pushed to 8.0.x, 8.1.x and 8.2.x. Thanks!
Comment #22
isntall commentedThe new DCI tag has been deployed that takes advantage of this new functionality.
Comment #23
dawehnerYou can see the change in git, but the issue doesn't have a comment mentioning it, weird.