Skip to content
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

phpunit runner fails, wrong directory? #43

Closed
bojanz opened this issue Aug 20, 2015 · 6 comments
Closed

phpunit runner fails, wrong directory? #43

bojanz opened this issue Aug 20, 2015 · 6 comments

Comments

@bojanz
Copy link
Contributor

bojanz commented Aug 20, 2015

Commit:
drupalcommerce/commerce@bec25f7

Result:

/home/travis/.composer/vendor/lionsad/drupal_ti/runners/phpunit/script.sh: line 13: ./vendor/bin/phpunit: > No such file or directory
Error: /home/travis/.composer/vendor/lionsad/drupal_ti/runners/phpunit/script.sh exited with a failure.

https://travis-ci.org/commerceguys/commerce/jobs/76440492

Probably needs a similar fix as mradcliffe@729b806

@davereid
Copy link

@bojanz Curious for updating my own drupal_ti phpunit-tested modules using composer_manager. Is there a reason in https://github.com/commerceguys/commerce/blob/bec25f7e213fd53c3fdbe98b5aed5adbdf7b951f/.travis-before-script.sh why the composer_manager module isn't enabled first as per the instructions? Or why composer drupal-rebuild is used instead of composer drupal-install?

@bojanz
Copy link
Contributor Author

bojanz commented Aug 20, 2015

"composer drupal-install" is just "composer drupal-rebuild" + "composer install".
However, it can't accept arguments (symfony console limitation), and we need to pass "--prefer-source" to composer install in order to get around API rate limitations. So we use the two commands separately.

As for the module, it doesn't need to be enabled, since it just provides a reports page on the Drupal side. The actual logic is inserted via the init.php script and runs regardless of the module status.

@davereid
Copy link

Hrm, ok I may just lock in using the previous hash of composer_manager in our modules until everything is sorted out then.

@LionsAd
Copy link
Owner

LionsAd commented Sep 9, 2015

@bojanz I am pretty sure you should be using the 'phpunit-core' runner for commerce in 8.x.

phpunit runner should be used for modules using the 'pure' oop way of declaring dependencies on libraries via composer.json, and loading those from a tests/ directory.

e.g.

cd tests
composer install
phpunit

This is especially useful for modules not depending on D8 Core or D7 core in their interfaces.

@bojanz
Copy link
Contributor Author

bojanz commented Sep 26, 2015

I tried to switch to id, but got:

Could not read "core".
Error: /home/travis/.composer/vendor/lionsad/drupal_ti/runners/phpunit-core/script.sh exited with a failure.

https://travis-ci.org/commerceguys/commerce/jobs/82295121

@LionsAd
Copy link
Owner

LionsAd commented Dec 12, 2015

We figured this out in IRC - that was core vs. autoloader vs. modules problem.

Closing as there is nothing drupal_ti can do for that at this moment.

@LionsAd LionsAd closed this as completed Dec 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants