-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move phpunit tests (#295) #313
Conversation
@@ -21,7 +21,8 @@ | |||
public function __construct($name = NULL, array $data = array(), $data_name = '') { | |||
|
|||
parent::__construct($name, $data, $data_name); | |||
$this->projectDirectory = dirname(dirname(dirname(__DIR__))); | |||
$directory = realpath(dirname(__FILE__) . '/../../../'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely failing because of how the tests are called. They are intended to be called from the child blt-project
, but they are being called from the parent blt
here:
https://github.com/acquia/blt/blob/8.x/.travis.yml#L90
We'll want to tag these tests with a group like @blt-project
. Then, we can run test in two sets:
- cd ../blt-project
- phpunit tests/phpunit --group blt-project
- cd ../blt
- phpunit tests/phpunit --exclude-group blt-project
The blt-project
tests can then rely on a $this->project
directory variable that refers to ../../../../../../
given that the actual TestBase
will live in vendor/acquia/blt/tests/phpunit/src
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused here - the tests themselves all now live in vendor/acquia/blt/phpunit/src. Running phpunit tests/phpunit
from the blt-project directory does not find the tests that live in blt.
@@ -84,10 +84,12 @@ script: | |||
- blt deploy:build | |||
# Add Drupal VM config to repo. | |||
- blt vm:init | |||
# Run the 'blt-project' phpunit tests. | |||
- phpunit vendor/acquia/blt/tests/phpunit --group blt-project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't these get executed already by the ci:build:validate:test target run in blt-project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, they do appear to be run, I missed them when inspecting the test output earlier. I'll take that back out.
No description provided.