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

tests are now run parallel #94

Closed

Conversation

vladyslavstartsev
Copy link
Contributor

No description provided.

@nikic
Copy link
Collaborator

nikic commented Apr 25, 2020

I don't think specifying -j on make test does anything.

@vladyslavstartsev
Copy link
Contributor Author

At least if you execute
run-tests.php -h
it says

Options:
    -j<workers> Run up to <workers> simultaneous testing processes in parallel for
                quicker testing on systems with multiple logical processors.
                Note that this is experimental feature.

When I execute ./run-tests.php -j6
it also says

=====================================================================
========= WELCOME TO THE FUTURE: run-tests PARALLEL EDITION =========
=====================================================================
Spawning workers… 1 2 3 4 5 6 … done!
=====================================================================

@vladyslavstartsev
Copy link
Contributor Author

At least if you execute
run-tests.php -h
it says

Options:
    -j<workers> Run up to <workers> simultaneous testing processes in parallel for
                quicker testing on systems with multiple logical processors.
                Note that this is experimental feature.

When I execute ./run-tests.php -j6
it also says

=====================================================================
========= WELCOME TO THE FUTURE: run-tests PARALLEL EDITION =========
=====================================================================
Spawning workers… 1 2 3 4 5 6 … done!
=====================================================================

I also did benchmark with -j6 and without it

time  ./run-tests.php
time  ./run-tests.php -j6

results are
with -j6 it's 1m18.229s (I'm using the real param of time)
without it it's 3m38.500s

@nikic
Copy link
Collaborator

nikic commented Apr 25, 2020

run-tests.php supports -j, but make test does not.

@sergeyklay
Copy link

export TEST_PHP_EXTRA_ARGS="-j$(getconf _NPROCESSORS_ONLN)"
make test

@vladyslavstartsev
Copy link
Contributor Author

please check @carusogabriel @nikic @sergeyklay

@Girgias
Copy link
Collaborator

Girgias commented Jan 14, 2021

run-tests.php supports -j, but make test does not.

make test TESTS="-jN" works however.

@nikic
Copy link
Collaborator

nikic commented Jan 14, 2021

The ability to run tests in parallel is now mentioned in https://www.phpinternalsbook.com/php7/build_system/building_php.html#running-the-test-suite.

@nikic nikic closed this Jan 14, 2021
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

Successfully merging this pull request may close these issues.

None yet

5 participants