Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

shell recorder: safe working directory #1982

Closed
Tracked by #4482
markus2330 opened this issue May 12, 2018 · 9 comments
Closed
Tracked by #4482

shell recorder: safe working directory #1982

markus2330 opened this issue May 12, 2018 · 9 comments
Labels
lang/shell stale testing errors in tests without implication on real usage

Comments

@markus2330
Copy link
Contributor

markus2330 commented May 12, 2018

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

@markus2330
Copy link
Contributor Author

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.

@markus2330
Copy link
Contributor Author

@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?

@sanssecours
Copy link
Member

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.

@markus2330 markus2330 added testing errors in tests without implication on real usage and removed proposal labels Apr 12, 2020
@stale
Copy link

stale bot commented Apr 15, 2021

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 💖

@stale stale bot added the stale label Apr 15, 2021
@stale
Copy link

stale bot commented Apr 30, 2021

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 💖

@stale stale bot closed this as completed Apr 30, 2021
@mpranj mpranj added this to the 1.0.0 milestone Apr 30, 2021
@mpranj
Copy link
Member

mpranj commented Apr 30, 2021

Tests should definitely be more isolated (e.g. like proposed here somewhere under TMPDIR) and never modify other existing (configuration) files.

@mpranj mpranj reopened this Apr 30, 2021
@stale stale bot removed the stale label Apr 30, 2021
@markus2330 markus2330 removed this from the 1.0.0 milestone Jul 21, 2021
@stale
Copy link

stale bot commented Jul 30, 2022

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 💖

@stale stale bot added the stale label Jul 30, 2022
@markus2330 markus2330 added 3p three points floss2022w labels Aug 1, 2022
@stale stale bot removed the stale label Aug 1, 2022
@markus2330 markus2330 removed 3p three points floss2022w labels Sep 25, 2022
Copy link

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 💖

@github-actions github-actions bot added the stale label Feb 19, 2024
Copy link

github-actions bot commented Mar 4, 2024

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 💖

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
@github-project-automation github-project-automation bot moved this to Done in 1.0 Aug 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lang/shell stale testing errors in tests without implication on real usage
Projects
Status: Done
Development

No branches or pull requests

4 participants