Skip to content
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

Optional sandboxed test execution #23

Open
sampsyo opened this issue Mar 3, 2023 · 0 comments
Open

Optional sandboxed test execution #23

sampsyo opened this issue Mar 3, 2023 · 0 comments

Comments

@sampsyo
Copy link
Contributor

sampsyo commented Mar 3, 2023

Currently, test commands get executed "in place," i.e., the working directory is where the turnt.toml file lives. This works fine for simple setups, but some other situations would benefit from sandboxing, i.e., running the test somewhere and copying the results back. Namely:

  • Situations where you need to set up a little test environment consisting of N other files (which are identical across test cases).
  • Situations where the test command produces output files with "fixed" names that don't depend on the test, and these would conflict among different concurrent test cases.

In these situations, sandboxing can help: you first copy all the relevant test files into /tmp/something, execute the command there, copy any outputs back from there to the original directory, and then rm -rf /tmp/something. How exactly this should work (how do you specify the files to populate the sandbox, and the files to collect from the sandbox?) is still unclear to me, but we should consider adding it as an option. It should remain optional, however, because sandboxing has annoying trade-offs: it makes it hard to investigate when something goes wrong, for example. So this will take some more deign before this is ready to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant