How to inspect the sandbox for cram tests #11167
Blaisorblade
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Cram tests run into a temporary sandbox folder that gets deleted — is there a way to prevent deletion, to allow inspecting the sandbox or even modifying it (when debugging the test)?
In my case, my cram tests generates some file
foo.v
, and then compiles it with Coq. I'm getting unexpected errors so I'd like to inspectfoo.v
— the only way I found is to addcat foo.v
to my cram test, use promotion to updaterun.t
, then copy-paste the output out of the.t
. But this seems hacky, and would get worse if I had multiple generated files, or some of them were binary (and yes, something like base64 encoding could make the hack applicable there too).Or I can extract the commands from the
run.t
file and run them outside — again, a hassle if there are many commands.All this gets worse if the problem isn't repeatable — but I wouldn't restrict a solution to failing tests: I might want to inspect the sandbox even when the test succeeds.
EDIT: I already tried
--sandbox=none
— but I can't find outputs, and ifrun.t
needs changes, the diff shows that the test still runs under_build/.sandbox
. Example:Beta Was this translation helpful? Give feedback.
All reactions