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

WIP chore(travis): use phpdbg instead of xdebug for code coverage #11496

Closed
wants to merge 2 commits into from

Conversation

jeabakker
Copy link
Member

No description provided.

@jeabakker jeabakker force-pushed the travis-coverage-speedup branch 3 times, most recently from fad029e to d49a78a Compare December 12, 2017 16:04
@hypeJunction
Copy link
Contributor

hypeJunction commented Dec 18, 2017

Try this: phpdbg -qrr -S cli ./vendor/phpunit/phpunit/phpunit --bootstrap ./engine/tests/phpunit/bootstrap.php -c ./phpunit.xml --coverage-clover clover

@jeabakker jeabakker force-pushed the travis-coverage-speedup branch 2 times, most recently from c37f90e to b6d5508 Compare December 19, 2017 09:20
@hypeJunction
Copy link
Contributor

You need to set the sapi to cli to stop all the logging.
I have tried this locally and a bunch of tests that were dealing with files have failed, therie is next to none info on phpdbg anywhere.

@jeabakker
Copy link
Member Author

jeabakker commented Dec 19, 2017

but if i set the sapi to cli i get an error from PHPUnit that no coverage driver could be detected :(

see https://travis-ci.org/Elgg/Elgg/jobs/318515710#L833

@jeabakker
Copy link
Member Author

Here https://github.com/sebastianbergmann/environment/blob/master/src/Runtime.php#L171 you can see how PHPdbg is detected, which is based on SAPI name

@hypeJunction
Copy link
Contributor

Then just add phpdbg to Printer service constructor

@jeabakker
Copy link
Member Author

you mean here https://github.com/Elgg/Elgg/blob/master/engine/classes/Elgg/Di/ServiceProvider.php#L387

add a new, or direct it to cli?

@hypeJunction
Copy link
Contributor

In_array should do I think

@jeabakker jeabakker force-pushed the travis-coverage-speedup branch 3 times, most recently from d0adaf0 to 775b660 Compare December 19, 2017 15:27
@jeabakker
Copy link
Member Author

i think it's using phpdbg correctly now, but still run into a resource problem in the plugins testsuite

https://travis-ci.org/Elgg/Elgg/jobs/318679268#L964

The command "phpdbg -qrr ./vendor/phpunit/phpunit/phpunit --configuration ./phpunit.xml --testsuite plugins --coverage-clover plugins.clover" exited with 137.

which indicates out of memory
https://docs.travis-ci.com/user/common-build-problems/#My-build-script-is-killed-without-any-error

and some other strange build errors on stuff i didn't touch.......

@jeabakker
Copy link
Member Author

@Elgg/core anyone an idea why this https://travis-ci.org/Elgg/Elgg/jobs/319055552#L900 would fail only in the code coverage test?

And an idea how why can make the plugin tests use less resources, as mentioned above?

@jdalsem jdalsem changed the title chore(travis): use phpdbg instead of xdebug for code coverage WIP chore(travis): use phpdbg instead of xdebug for code coverage Dec 20, 2017
@hypeJunction
Copy link
Contributor

hypeJunction commented Dec 20, 2017

Some forums suggesting:

sudo: required
dist: trusty

@jeabakker
Copy link
Member Author

jeabakker commented Dec 20, 2017 via email

@jeabakker
Copy link
Member Author

a comparison of the available build environments https://docs.travis-ci.com/user/reference/overview/#Virtualization-environments

sudo: required
dist: trusty

would give more memory, but takes longer to start

@hypeJunction
Copy link
Contributor

I imagine this can be done just for one of the builds

@jeabakker jeabakker force-pushed the travis-coverage-speedup branch 4 times, most recently from 0e9d4ca to 6a82ce6 Compare December 21, 2017 12:57
@jeabakker
Copy link
Member Author

new errors :( 'too many open files'
https://travis-ci.org/Elgg/Elgg/jobs/319691233#L972

I tried upping the limit with ulimit -n unlimited which isn't allowed https://travis-ci.org/Elgg/Elgg/jobs/319631519#L836

even with sudo
https://travis-ci.org/Elgg/Elgg/jobs/319637719#L845

@hypeJunction
Copy link
Contributor

Can we just go back to scrutnizer grinding the code coverage until you figure out how you want Travis to handle the queue without making everyone wait for 3 hours?

@jdalsem
Copy link
Member

jdalsem commented Dec 21, 2017

the alternative is timeout and waiting for scrutinizer... in both services we need to solve wait time issues

@jeabakker
Copy link
Member Author

Can we just go back to scrutnizer grinding the code coverage

for now restored scrutinizer config

@hypeJunction
Copy link
Contributor

I don't care so much about scrutinizer, we don't have to wait for it to merge things. It's like a dessert that's nice to have.

@hypeJunction
Copy link
Contributor

Travis code coverage job needs to go away for now. Restoring scrutinizer config doesn't fix the problem of halted builds on Travis. We only have 5 containers, and until those jobs complete no new containers are available.

@jeabakker
Copy link
Member Author

will try this again at a later date

@jeabakker jeabakker closed this Jan 18, 2018
@jeabakker jeabakker deleted the travis-coverage-speedup branch January 22, 2018 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants