◐ Shell
reader mode source ↗
Skip to content

bpo-33873: Fix bug in runtest.py and add checks for invalid -R parameters#7735

Merged
pablogsal merged 4 commits into
python:masterfrom
pablogsal:bpo33873
Jun 26, 2018
Merged

bpo-33873: Fix bug in runtest.py and add checks for invalid -R parameters#7735
pablogsal merged 4 commits into
python:masterfrom
pablogsal:bpo33873

Conversation

@pablogsal

@pablogsal pablogsal commented Jun 15, 2018

Copy link
Copy Markdown
Member

@pablogsal

Copy link
Copy Markdown
Member Author

I have added the checks for the --huntrleaks/-R in Regrtest._main to avoid entering Regrtest.run_test and do the sys.exit() there but I am not sure what is the best location. Also, I used a new errorcode (2) but again, not sure if we want a custom error code for that.

@pablogsal pablogsal changed the title bpo-33873: Fix bug in runtest.py that makes running tests an extra time Jun 15, 2018
@pablogsal

Copy link
Copy Markdown
Member Author
~/github/cpython bpo338738s
❯ ./python -m test -R 0:0 test_os -m test_access
Invalid values for the --huntrleaks/-R parameters
                                                                                                                                               
~/github/cpython bpo33873 ✔
❯ ./python -m test -R 0:1 test_os -m test_access
Invalid values for the --huntrleaks/-R parameters
                                                                                                                                               
~/github/cpython bpo33873 ✔
❯ ./python -m test -R 1:0 test_os -m test_access
Invalid values for the --huntrleaks/-R parameters
                                                                                                                                               
~/github/cpython bpo33873 ✔
❯  ./python -m test -R 0:-2 test_list
Invalid values for the --huntrleaks/-R parameters

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

IMHO a NEWS entry would be worth it here. You can use the name "regrtest" to name the CPython test runner libregrtest.

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

LGTM.

Since you are now a core dev, would you like to merge it yourself? :-)

@vstinner

Copy link
Copy Markdown
Member

"VSTS: docs — docs_20180616.05 failed"

I don't understand the failure. It says "Initialize phase: Failed" but I don't see any failure in logs. I suggest to ignore this error.

@vstinner

Copy link
Copy Markdown
Member

@pablogsal: The change LGTM, do you want to merge it? It would help me to work on my PR #7827.

@pablogsal pablogsal merged commit 58ed730 into python:master Jun 26, 2018
@pablogsal pablogsal deleted the bpo33873 branch June 26, 2018 14:17
@pablogsal

Copy link
Copy Markdown
Member Author

Merged! ✨

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@bedevere-bot

Copy link
Copy Markdown

GH-7933 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 26, 2018
…rameters (pythonGH-7735)

Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs.

Add check for invalid --huntrleaks/-R parameters.
(cherry picked from commit 58ed730)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-7934 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 26, 2018
…rameters (pythonGH-7735)

Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs.

Add check for invalid --huntrleaks/-R parameters.
(cherry picked from commit 58ed730)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
vstinner added a commit that referenced this pull request Jun 26, 2018
* bpo-33718: regrtest: use format_duration() to display failed tests (GH-7686)

* Enhance also format_duration(): work on integers and rounds towards
  +infinity (math.ceil).
* Write unit tests on format_duration()

(cherry picked from commit 4ffe9c2)

* bpo-33873: regrtest: Add warning on -R 1:3 (GH-7736)

regrtest: Add warning when using less than 3 warmup runs like -R 1:3.
(cherry picked from commit cac4fef)

* bpo-33873: Fix bug in `runtest.py` and add checks for invalid `-R` parameters (GH-7735)

Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs.

Add check for invalid --huntrleaks/-R parameters.

(cherry picked from commit 58ed730)
vstinner added a commit that referenced this pull request Jun 26, 2018
* bpo-33718: regrtest: use format_duration() to display failed tests (GH-7686)

* Enhance also format_duration(): work on integers and rounds towards
  +infinity (math.ceil).
* Write unit tests on format_duration()

(cherry picked from commit 4ffe9c2)

* bpo-33873: regrtest: Add warning on -R 1:3 (GH-7736)

regrtest: Add warning when using less than 3 warmup runs like -R 1:3.

(cherry picked from commit cac4fef)

* bpo-33873: Fix bug in `runtest.py` and add checks for invalid `-R` parameters (GH-7735)

Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs.

Add check for invalid --huntrleaks/-R parameters.

(cherry picked from commit 58ed730)
vstinner added a commit that referenced this pull request Jun 26, 2018
* bpo-33718: regrtest: use format_duration() to display failed tests (GH-7686)

* Enhance also format_duration(): work on integers and rounds towards
  +infinity (math.ceil).
* Write unit tests on format_duration()

(cherry picked from commit 4ffe9c2)

* bpo-33873: regrtest: Add warning on -R 1:3 (GH-7736)

regrtest: Add warning when using less than 3 warmup runs like -R 1:3.
(cherry picked from commit cac4fef)

* bpo-33873: Fix bug in `runtest.py` and add checks for invalid `-R` parameters (GH-7735)

Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs.

Add check for invalid --huntrleaks/-R parameters.

(cherry picked from commit 58ed730)
(cherry picked from commit d1f9481)
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.

5 participants