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

tools: allow test.py to use full paths of tests #9694

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
9 participants
@reconbot
Copy link
Contributor

reconbot commented Nov 19, 2016

Checklist
  • commit message follows commit guidelines
  • ran test suite, no new tests
Affected core subsystem(s)

Fixes: #9684
tools/test.py can now take paths like

$ python tools/test.py test/parallel/test-cluster-worker-init.js
$ python tools/test.py test/parallel/test-cluster-worker-init
$ python tools/test.py parallel/test-cluster-worker-init.js
Description of change

Slices off the test/ and the .js on input files. Wildcards like parallel/test-cluster-* will still work as will defaults.

@Fishrock123

This comment has been minimized.

@MylesBorins
Copy link
Member

MylesBorins left a comment

LGTM if CI is green

@gibfahn
Copy link
Member

gibfahn left a comment

Looking forward to no more No tests to run because you copied the .js as well. Also tab-complete for tests is great.

@reconbot

This comment has been minimized.

Copy link
Contributor Author

reconbot commented Nov 19, 2016

@thealphanerd freebsd failed but I can't figure out what failed, I see "no failures"

screen shot 2016-11-19 at 10 35 51 am

@MylesBorins

This comment has been minimized.

Copy link
Member

MylesBorins commented Nov 19, 2016

failure looks infra related /cc @nodejs/build

fixes #9684

@addaleax
Copy link
Member

addaleax left a comment

LGTM

@jbergstroem

This comment has been minimized.

Copy link
Member

jbergstroem commented Nov 19, 2016

@thealphanerd what you meant to say was "the failure looks @jbergstroem-related". Should be fixed now.

@MylesBorins

This comment has been minimized.

Copy link
Member

MylesBorins commented Nov 19, 2016

@jbergstroem you are a hero! Thank you for all the hard infra work you do.

@jbergstroem

This comment has been minimized.

Copy link
Member

jbergstroem commented Nov 19, 2016

@thealphanerd thanks! if only the work wasn't so tied to fixing my other work :)

tools/test.py Outdated
@@ -1461,6 +1461,13 @@ def SplitPath(s):
stripped = [ c.strip() for c in s.split('/') ]
return [ Pattern(s) for s in stripped if len(s) > 0 ]

def NormalizePath(path):
# strip the extra path information of the specified test
if path[:5] == 'test/':

This comment has been minimized.

@thefourtheye

thefourtheye Nov 20, 2016

Contributor

Use startswith and endswith.

tools: allow test.py to use full paths of tests
Allow test.py to run tests with a 'tests/' prefix or a '.js' postfix

Fixes: #9684

@reconbot reconbot force-pushed the reconbot:testpy-paths branch to ddcbcf1 Nov 20, 2016

@reconbot

This comment has been minimized.

Copy link
Contributor Author

reconbot commented Nov 20, 2016

@thefourtheye updated to use startswith and endswith.

@thefourtheye
Copy link
Contributor

thefourtheye left a comment

Nice. LGTM. Thanks :)

@MylesBorins

This comment has been minimized.

Copy link
Member

MylesBorins commented Nov 26, 2016

landed in 951ba0d

MylesBorins added a commit that referenced this pull request Nov 26, 2016

tools: allow test.py to use full paths of tests
Allow test.py to run tests with a 'tests/' prefix or a '.js' postfix

PR-URL: #9694
Fixes: #9684
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>

MylesBorins added a commit that referenced this pull request Nov 26, 2016

tools: allow test.py to use full paths of tests
Allow test.py to run tests with a 'tests/' prefix or a '.js' postfix

PR-URL: #9694
Fixes: #9684
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>

MylesBorins added a commit that referenced this pull request Nov 26, 2016

tools: allow test.py to use full paths of tests
Allow test.py to run tests with a 'tests/' prefix or a '.js' postfix

PR-URL: #9694
Fixes: #9684
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>

MylesBorins added a commit that referenced this pull request Nov 26, 2016

tools: allow test.py to use full paths of tests
Allow test.py to run tests with a 'tests/' prefix or a '.js' postfix

PR-URL: #9694
Fixes: #9684
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>

@reconbot reconbot deleted the reconbot:testpy-paths branch Nov 27, 2016

@MylesBorins MylesBorins referenced this pull request Dec 1, 2016

Merged

v6.9.2 proposal #9735

@Fishrock123 Fishrock123 referenced this pull request Dec 5, 2016

Merged

v7.2.1 proposal #10127

2 of 2 tasks complete

@MylesBorins MylesBorins referenced this pull request Dec 6, 2016

Merged

v4.7.0 proposal #9736

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.