It can be useful for e.g. helper functions to behave differently
depending on which test case is being executed. This patch helps with
that by making the #testcase case available as a TESTCASE environment
variable.
Details
- Reviewers
quark yuja - Group Reviewers
hg-reviewers - Commits
- rHGf04d16bef2c7: tests: make #testcase available as env var in test
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
tests/run-tests.py | ||
---|---|---|
1338 | Maybe util.shellquote the name. |
tests/run-tests.py | ||
---|---|---|
1338 | Done (but it seems to be just shellquote in the test runner). |
tests/run-tests.py | ||
---|---|---|
1338 | Needs export TESTCASE to export shell variables to environment. |
tests/run-tests.py | ||
---|---|---|
1338 |
Sure, will do. I wasn't sure if I should or shouldn't. Are you thinking that it may be useful if the function in my test case is instead a stand-alone script/binary? |
Are you thinking that it may be useful if the function in my test case is instead a stand-alone script/binary?
No idea if it'll be useful, but there seemed no reason to narrow the scope
of $TESTCASE variable.
Queued, thanks.
Maybe util.shellquote the name.