-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Refactor common scripting test code #14108
Refactor common scripting test code #14108
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.
Looks good. Sadly, you didn't add [test_non_bootstrapped]
and [test_windows_full]
in body of your PR to enable these checks.
I think we need to add this trick to CI
types: [ opened, synchronize, reopened, edited ]
from here https://frontside.com/blog/2020-05-26-github-actions-pull_request/#how-do-workflows-trigger-on-pull_request so we could enable the CI without reopening the PR
So if I add those strings to the PR text, it will enable the addition tests? Ah, I now see the link you provided, I'll read it. |
Unfortunately, editing text body now will have no effect, because we don't have |
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.
@philwalk Here are my suggestions :
File scripting/BashScriptsTests.scala
- who does remove the temporary file create on line 21 ?!
Tip : use annotationorg.junit.AfterClass
. - improve comment text on line 59;
e.g.verify
.dist/bin/scala
with -J setting and Scala script file
NB. The same remark applies to the next 3 test functions (-J
and-D
). - variable
mismatches
in unused on line 98.
File scripting/ScriptTestEnv.scala
- remove 1st (empty) line of file.
- add comment text on line 15; in particular explain the usage of variables
TEST_CWD
(line 24) andTEST_BASH
(line 31). - add a comment on line 68 to explain the values returned by the
bashCommand
function ! - add a comment to explain why we may encounter "
permission denied
" on line 79. - indent
case
's inmatch
statement on line 141.
No longer valid |
This addresses issues described in #12962
It also is relevant to #14073
Refactor test sources:
Common code is moved to a new file:
So called
invalid tests
(where permissions fail when running bash command lines) are now treated by default as test failures, although this behavior can be overridden, if needed, by definingPASS_INVALID_TESTS
.