-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if CI is green
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward to no more No tests to run
because you copied the .js
as well. Also tab-complete for tests is great.
@thealphanerd freebsd failed but I can't figure out what failed, I see "no failures" |
failure looks infra related /cc @nodejs/build fixes #9684 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@thealphanerd what you meant to say was "the failure looks @jbergstroem-related". Should be fixed now. |
@jbergstroem you are a hero! Thank you for all the hard infra work you do. |
@thealphanerd thanks! if only the work wasn't so tied to fixing my other work :) |
@@ -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/': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use startswith
and endswith
.
Allow test.py to run tests with a 'tests/' prefix or a '.js' postfix Fixes: nodejs#9684
b5cd231
to
ddcbcf1
Compare
@thefourtheye updated to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. LGTM. Thanks :)
landed in 951ba0d |
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>
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>
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>
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>
Checklist
Affected core subsystem(s)
Fixes: #9684
tools/test.py
can now take paths likeDescription of change
Slices off the
test/
and the.js
on input files. Wildcards likeparallel/test-cluster-*
will still work as will defaults.