Problem/Motivation
PrepareFilesystem does three things:
It sets up the file system to be appropriate for a Drupal installation and subsequently use run-tests.sh.
It starts up the phantomjs process.
It prints some status info about the PHP version.
Starting phantomjs and showing the PHP version belong in the environment phase. Setting up the filesystem for the system under test belong in the assessment phase.
PHP version reporting duties will be handled in #2843549: RunContainers should output php -i as an artifact
Proposed resolution
Split out these behaviors appropriately.
Allow preparing the filesystem to break the build if the filesystem couldn't be prepared.
Remaining tasks
Deal with PHP version reporting in #2843549: RunContainers should output php -i as an artifact
User interface changes
API changes
Data model changes
Original report:
Its all setup for the simpletest plugin, so it should happen when we run that plugin. Definitely doesnt need its own plugin as its behavior specific to simpletest. Besides, we need to do some differently things for d7 so we should keep it altogether to make it overrideable.
Comments
Comment #2
mile23+1.
PrepareFilesystemassumes that the containers are available anyway, so it shouldn't be inenvironment:It looks like
PrepareFilesystemdoesn't even useFileHandlerTrait.There's also this commented code that should end up uncommented:
Comment #3
mile23Comment #4
mile23Simplifying the scope back to what it was. :-)
Chatting in IRC we decided the filesystem set up should be encapsulated in the simpletest plugin.
We thought SimpletestD7 might just override the prepareFilesystem method, but it requires the setup, as well.
Starting phantomjs and php -v are still present in prepare_filesystem, which shouldn't really be called prepare_filesystem any more. The PHP version part will get moved away in #2843549: RunContainers should output php -i as an artifact. We can deal with where to put the phantomjs startup in another follow-up.
Comment #6
mile23Comment #9
MixologicThis got a shuffling, and is deployed.