libelektra
libelektra copied to clipboard
shell recorder: safe working directory
It might be a good idea to create a temporary directory below TMPDIR and set HOME and PWD to this path. Potential leftovers and programming errors would only affect this directory.
This is already done for the cframework test cases and works there quite well.
EDIT:
Furthermore, we need variables, that:
- point to the Markdown file executed
- point to the top-level source dir
see also #1955 and #1981 for rationale
This way we would also get rid of the leftovers files "stderr" and stdout" which are left in the source repo from time to time.
@sanssecours wrote:
That is certainly a must have, if we execute tests in a random location. This behavior sounds also very similar to the way Cram handles this: Cram sets the variable TESTDIR to the location of the file under test.
Could you please elaborate? TESTDIR points to a file?
Could you please elaborate? TESTDIR points to a file?
The variable saves the directory of the file under test. For example, if your file under test is foo/bar/test.t, then the variable contains the value foo/bar.
I mark this issue stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping the issue by writing a message here or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:
I closed this issue now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:
Tests should definitely be more isolated (e.g. like proposed here somewhere under TMPDIR) and never modify other existing (configuration) files.
I mark this issue stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping the issue by writing a message here or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:
I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping by writing a message here or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:
I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart: