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

Add parallelism to test_pr #1880

Closed
bfroehle opened this issue Jun 7, 2012 · 4 comments · Fixed by #4167
Closed

Add parallelism to test_pr #1880

bfroehle opened this issue Jun 7, 2012 · 4 comments · Fixed by #4167
Labels
Milestone

Comments

@bfroehle
Copy link
Contributor

bfroehle commented Jun 7, 2012

I often have several unused cores sitting around, so it'd be great if the test_pr script could allow some parallelism.

  1. If the virtual environments were created per PR request, I'd be able to run test_pr against multiple PRs simultaneously.
  2. With a slight refactoring (potentially adding locks around some bits of the code), it should also be possible to run the iptest scripts in each virtual environment concurrently.
@takluyver
Copy link
Member

@minrk : I've always avoided running more than one instance of the test suite at a time, because I'm not sure how it would affect tests that require interprocess communications, especially in IPython.parallel. Is it actually quite safe to do that, or would it be simple to make it safe?

@minrk
Copy link
Member

minrk commented Jun 8, 2012

No, it is not safe to do that with the parallel stuff. I think it should be if the IPYTHONDIR is guaranteed to be different for each env.

@fperez
Copy link
Member

fperez commented Jun 8, 2012

What I'd like to do is rig iptest so that each 'test group' is run not only in a new process (which is already the case) but with a new, random and temporary IPYTHONDIR. That is really easy to do, and it will allow us to parallelize not only across test_pr environments but also across test groups in a single iptest run (with some attention paid to the collection of stdout/stderr, obviously, as is always the case with parallelizing console jobs).

@minrk
Copy link
Member

minrk commented Jun 8, 2012

That would be excellent. @bfroehle any interest in doing that here?

fperez added a commit that referenced this issue Jul 26, 2012
Create a unique & temporary IPYTHONDIR for each testing group.

Following #2148 (unification of Windows / Unix code in iptest), and
in progress towards #1880 (Add parallelism to iptest & test_pr), this
pull request launches each iptest test group with a unique & temporary
`IPYTHONDIR`.

This has two benefits:
* Insulates the test suite from any craziness in your own configuration.
  (Try adding `import sys; sys.exit()` to your config file...).
* Allows multiple test suites to be launched in parallel without the worry of
  conflicts.
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Create a unique & temporary IPYTHONDIR for each testing group.

Following ipython#2148 (unification of Windows / Unix code in iptest), and
in progress towards ipython#1880 (Add parallelism to iptest & test_pr), this
pull request launches each iptest test group with a unique & temporary
`IPYTHONDIR`.

This has two benefits:
* Insulates the test suite from any craziness in your own configuration.
  (Try adding `import sys; sys.exit()` to your config file...).
* Allows multiple test suites to be launched in parallel without the worry of
  conflicts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants