8000 [WIP] Add `build.xml` to run testsuite in parallel by asm89 · Pull Request #7708 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[WIP] Add build.xml to run testsuite in parallel #7708

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

Closed
wants to merge 1 commit into from

Conversation

asm89
Copy link
Contributor
@asm89 asm89 commented Apr 18, 2013
Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

Based of the work that @Ocramius has done to speed up the testsuite
running on travis for zf2! zendframework/zendframework#3703

On my laptop a full run of the testsuite goes from 1m 36s to 36s. This way we also occupy travis-ci less. :)

Based of the work that @Ocramius has done to speed up the testsuite
running on travis for zf2!

zendframework/zendframework#3703
<arg value="--dev" />
<arg value="--prefer-source" />
</exec>
</target>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making composer install part of the script instead of before_script is a bad idea IMO. Travis improved their UI recently to collapse the logs of the before scripts by default, so that you can see the test output more easily. You are including the composer installation output in the test output now (and it is generally quite big)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @stof for another reason: decoupling testing from installing composer. That would allow to use this locally on your machine, independently of where composer is installed.

Copy link
Contributor 8000 Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I'll revert that.

@stof
Copy link
Member
stof commented Apr 18, 2013

And the output is also quite ugly with all these concat being added in the output

@asm89
Copy link
Contributor Author
asm89 commented Apr 18, 2013

It seems that one test of the Console component is failing. Maybe related to the tty provided by ant I guess? Anyone with more experience in this have any insights in this? @Seldaek maybe?

@fabpot
Copy link
Member
fabpot commented Apr 18, 2013

@asm89 Yes, the tests for the console need a proper tty to run.

@stof
Copy link
Member
stof commented Apr 18, 2013

btw, it looks like it is loosing some output: https://travis-ci.org/asm89/symfony/jobs/6439482#L116

@Ocramius
Copy link
Contributor

@stof looks like that's travis - the log looks fine: https://s3.amazonaws.com/archive.travis-ci.org/jobs/6439483/log.txt I will ask the travis guys :)

<sequential>
<echo output="${basedir}/build/test-results/@{bridge}.log" level="debug">

Symfony/Bridge/@{bridge}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should use a \ IMO to look like a namespace (note that the ZF team asked the same change)

@fabpot
Copy link
Member
fabpot commented Apr 20, 2013

@asm89 Are you working on updating this PR?

@asm89
Copy link
Contributor Author
asm89 commented Apr 20, 2013

I'll fix all the comments, no fix for the tty problem yet.
Op 20 apr. 2013 22:35 schreef "Fabien Potencier" notifications@github.com
het volgende:

@asm89 https://github.com/asm89 Are you working on updating this PR?


Reply to this email directly or view it on GitHubhttps://github.com//pull/7708#issuecomment-16710875
.

@fabpot
Copy link
Member
fabpot commented Jun 13, 2013

Any news on this PR. If we cannot make it work (especially for the tty issue), then let's close it for now.

@asm89
Copy link
Contributor Author
asm89 commented Jun 13, 2013

@fabpot I haven't been able to figure out the TTY issue. I was hoping
@Seldaek or some other console expert could take a quick look. If not, I'll
re-open if I find a fix myself.

On Thu, Jun 13, 2013 at 10:10 AM, Fabien Potencier <notifications@github.com

wrote:

Any news on this PR. If we cannot make it work (especially for the tty
issue), then let's close it for now.


Reply to this email directly or view it on GitHubhttps://github.com//pull/7708#issuecomment-19377765
.

@fabpot
Copy link
Member
fabpot commented Sep 25, 2013

closing in favor of #9018

@fabpot fabpot closed this Sep 25, 2013
fabpot added a commit that referenced this pull request Sep 25, 2013
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9018).

Discussion
----------

Parallelized travis builds

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Yet another approach to running all tests in parallel (see #7708 and #8312).

This one uses [GNU Parallel](http://www.gnu.org/software/parallel/) which by default [will run one job per available CPU](http://www.gnu.org/software/parallel/man.html#jobs_n).

Comparison of random builds (recent build times on my travis account):

| PHP version| [master](https://travis-ci.org/jakzal/symfony/builds/11300678)             |  [parallel](https://travis-ci.org/jakzal/symfony/builds/11300689)
| ------------- | --- | ---
| 5.3.3| 6 min 11 sec | 3 min 45 sec
| 5.3| 7 min 26 sec | 4 min 10 sec
| 5.4| 6 min 31 sec | 3 min 31 sec
| 5.5| 6 min 37 sec | 3 min 45 sec

On my laptop it takes 1.5min to run a whole suite parallelised (compared to over 4min when run as usual).

Commits
-------

de8d1b5 Run all tests in parallel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0