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

New "test info" file requires that the current directory be writable #259

Open
bleargh45 opened this issue Nov 4, 2022 · 3 comments
Open

Comments

@bleargh45
Copy link
Contributor

The recently added "test info" file (see

my $info_file = "./.test_info.$$.json";
), used for yath resources, requires that Yath be run from a directory which is writable. When running builds/tests inside of a Docker Container, though, this may not always be the case.

Should this file not be recorded into a temp directory (such as /tmp) instead?

@exodist
Copy link
Member

exodist commented Nov 4, 2022

Ah, I do understand the problem.

The nature of this file, and its purpose do make it potentially useless outside of the home dir. Though I may be able to work out something like I did for the persistent runner's file, which no longer depends on the home dir.

As for this (and the persistent runners) when the repo dir is not writable, I think I can make an option to disable it, and make that option's value depend on the writability of the repo dir.

I will work on this next time I have a moment, which unfortunately may mean it has to wait for the week of thanksgiving.

@bleargh45
Copy link
Contributor Author

For the moment, I have been able to disable the use of the file by setting TEST2_HARNESS_NO_WRITE_TEST_INFO=1 in my ENV, but that obviously does mean that the yath resources command does not work (which for the moment is not an issue for me).

@abraxxa
Copy link

abraxxa commented Sep 4, 2024

I was just hit by this issue too because the file breaks the test run by Dist::Zilla::Plugin::Test::DistManifest.
The env var TEST2_HARNESS_NO_WRITE_TEST_INFO seems to be undocumented at the moment.

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

3 participants