Problem/Motivation
Core's run-tests.sh outputs an XML format that is not well-formed as JUnit.
Core needs a new JUnit output feature: #2834033: Add a junit format to run-tests.sh
The testbot has solved this problem already, in order to output proper JUnit for Jenkins to consume.
run-tests.sh really should be in charge of outputting the JUnit formatted results.
Proposed resolution
Take the XML reformatting duties from the testbot's simpletest plugin.
Turn that code into a stand-alone helper class.
Ensure that the helper class is testable and maintainable.
Remaining tasks
Eventually, migrate that code to core for use in run-tests.sh.
Comments
Comment #3
MixologicHawt. I'll look a little closer at this tomorrow, but first instinct says yeah, add the service and we're golden.
Comment #4
mile23...Well except it doesn't pass tests yet.
Comment #8
mile23The tests pass now.
We can't currently inject the results database as a service from the container because it is stateful, so there should be a follow-up on that. The problem arises when SimpletestD7 re-arranges the database config for D7's run-tests.sh, leading to a service-discovered Database object that can't create a connection. The solution is to pass the current database connection as a parameter to generate(). See http://cgit.drupalcode.org/drupalci_testbot/commit/?id=89e329b
Not injecting the service is imperfect, but adequate for the refactor at this point.
Comment #11
mile23So the deal with the db.results service was that simpletest_d7 was throwing it away and using a copy of db.system locally. Now simpletest_d7 assigns db.results to db.system during inject(), so both services are equivalent.
This isn't optimal, but it works.
Comment #13
MixologicThis: LGTM : https://dispatcher.drupalci.org/job/DrupalCI_CI_Ci_ci/239/
Deployed!
Comment #14
Mixologic