Skip to content

Conversation

@potix2
Copy link
Contributor

@potix2 potix2 commented Jan 29, 2015

Add options to run individual test suites in python/run-tests.

TODO

  • split the script into two, one that tests with a particular python version and another that loops over the versions and invokes that script.
  • rewrite in python

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

1 similar comment
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@JoshRosen
Copy link
Contributor

Another useful refactoring would be to let us run the tests for only one of the supported Python versions instead of all of them. This is useful when augmenting the test suite to collect coverage metrics. To do this, maybe we should split the script into two, one that tests with a particular python version and another that loops over the versions and invokes that script.

@potix2
Copy link
Contributor Author

potix2 commented Jun 2, 2015

ok, I understand it. I try to split run-tests and rebase this branch onto master.

@potix2
Copy link
Contributor Author

potix2 commented Jun 3, 2015

@JoshRosen Should we define the list of supported python versions in a test script?
I found the below versions in a current python/run-tests.

  • 2.6
  • 3.4
  • pypy

@JoshRosen
Copy link
Contributor

@potix2, yep, that's the right set of versions to test against. In the top-level test runner script, I think that we can check whether those versions are installed (using which) then build up a list of Python executables that we'll run against. So maybe by default we'll run against whatever subset of those are installed, but will have an option to manually specify just one version to run for manual testing / debugging.

By the way, if it's easier then I'd be fine with rewriting this file in Python rather than keeping it as bash.

@potix2
Copy link
Contributor Author

potix2 commented Jun 3, 2015

Thank you, @JoshRosen. I got it. There is no problem to rewrite in Python.

@potix2 potix2 changed the title [SPARK-5482][PySpark] Allow individual test suites in python/run-tests [WIP][SPARK-5482][PySpark] Allow individual test suites in python/run-tests Jun 17, 2015
@JoshRosen
Copy link
Contributor

Jenkins, this is ok to test.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@SparkQA
Copy link

SparkQA commented Jun 18, 2015

Test build #35164 has started for PR 4269 at commit 5aa5aa5.

@JoshRosen
Copy link
Contributor

Hey @potix2, thanks for updating this. I'm going to take a look at this today because I have an outstanding PR to improve dev/run-tests's support for conditionally skipping certain tests in the pull request builder (see #6866). Once we get this pull request merged, then I'll be able to update my PR to perform its optimizations for Python tests as well.

In the long run, it might be nice to rewrite this in Python, but I don't feel that such as rewrite necessarily has to be a blocker to merging this. If you're already working on a Python port, though, then just let me know and I'll be happy to wait for it.

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this pypy.sh file isn't invoked from anywhere; do we need it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, we might want to remove the # -*- coding: utf-8 -*- lines in case Apache RAT complains about them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I remove them.

@SparkQA
Copy link

SparkQA commented Jun 18, 2015

Test build #35164 has finished for PR 4269 at commit 5aa5aa5.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@JoshRosen
Copy link
Contributor

Jenkins, retest this please.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@SparkQA
Copy link

SparkQA commented Jun 18, 2015

Test build #35179 has started for PR 4269 at commit 5aa5aa5.

@SparkQA
Copy link

SparkQA commented Jun 18, 2015

Test build #35179 has finished for PR 4269 at commit 5aa5aa5.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Merged build finished. Test PASSed.

@potix2
Copy link
Contributor Author

potix2 commented Jun 19, 2015

@JoshRosen, I haven't started rewriting in python yet, so it's no problem that I make it to be out of scope for this PR.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@SparkQA
Copy link

SparkQA commented Jun 19, 2015

Test build #35202 has started for PR 4269 at commit 36153f6.

@SparkQA
Copy link

SparkQA commented Jun 19, 2015

Test build #35202 has finished for PR 4269 at commit 36153f6.

  • This patch fails RAT tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@potix2 potix2 changed the title [WIP][SPARK-5482][PySpark] Allow individual test suites in python/run-tests [SPARK-5482][PySpark] Allow individual test suites in python/run-tests Jun 19, 2015
@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@SparkQA
Copy link

SparkQA commented Jun 19, 2015

Test build #35206 has started for PR 4269 at commit 6dec246.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@SparkQA
Copy link

SparkQA commented Jun 19, 2015

Test build #35208 has started for PR 4269 at commit e08f602.

@SparkQA
Copy link

SparkQA commented Jun 19, 2015

Test build #35206 has finished for PR 4269 at commit 6dec246.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@SparkQA
Copy link

SparkQA commented Jun 19, 2015

Test build #35208 has finished for PR 4269 at commit e08f602.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Merged build finished. Test PASSed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to double-quote $1?

Copy link
Contributor

Choose a reason for hiding this comment

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

By the way, this prints an error when I run it on my Mac:

[joshrosen python (2c6a7d4...)]$ ./run-tests
./run-tests: line 33: [: too many arguments

@JoshRosen
Copy link
Contributor

Actually, I find this bash code too difficult to understand / review and would rather just block on a complete Python rewrite. I don't want to spend the time to understand the bash-isms here if we're just going to rewrite anyways.

@potix2
Copy link
Contributor Author

potix2 commented Jun 19, 2015

Sorry to confuse you, I agree with you. As a first step, we should rewrite run-tests in Python, then append new features.

I took a look at #6866, I think it has some useful functions to rewrite bash code into Python. If you don't mind, I want to wait to merge it.

@JoshRosen
Copy link
Contributor

My other PR (#6866) was merged, so I think this should be unblocked now. Which functions were you hoping to borrow from that script? If we're going to use some of those functions in two places, then I guess we can either duplicate them or move them to a common location and import them from there. If we do choose to extract them into their own module, I'd probably opt to create a new Python module inside of the dev folder (maybe dev/sparktestsupport) and place the new utility functions file under there.

@JoshRosen
Copy link
Contributor

Hey @potix2, I've gone ahead and rewritten python/run-tests in Python in #6967. I haven't added any command-line flags for easily running individual suites, though. If you don't mind, can we wait until my PR is merged and then add those flags as part of this PR?

@potix2
Copy link
Contributor Author

potix2 commented Jun 24, 2015

Hi @JoshRosen, no problem. Thank you for considering this PR. I try to revise my code.

@JoshRosen
Copy link
Contributor

I ended up incorporating this feature into my pull request because I needed something like this in order to trigger a subset of the Python tests in the pull request builder. Therefore, I recommend that we close this PR and continue discussion on mine. Thanks!

@potix2
Copy link
Contributor Author

potix2 commented Jun 24, 2015

All right. Thanks!

@potix2 potix2 closed this Jun 24, 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

Successfully merging this pull request may close these issues.

4 participants