I’m trying to use `--no-process-execution-cleanup-...
# development
f
I’m trying to use
--no-process-execution-cleanup-local-dirs
and
-ldebug
in a pytest integration test of some rules in order to see what the output from a process run would be. I don’t see any log print-out though with the directory of where the process run would be. Any suggestions on what to configure to be able to see that?
h
The log should look like this:
[INFO] preserving local process execution dir
f
right, that is not bring printed out is the issue
Maybe because I’m getting
Error launching process: Os { code: 2, kind: NotFound, message: "No such file or directory" }
?
👍 1
I want to inspect the input root to see what is going on with it
h
Yeah I suspect that’s blocking things. What’s the missing file?
f
it’s not a missing file, it is not knowing the name of the unpacked goroot
or even that it got unpacked
h
what you can do is change the
argv
to run something like
/bin/true
instead. It’ll succeed and you can still see the chroot
f
👍
I assume I still need to configure pytest to not squelch output? I get an exception in the test now and only that exception is shown and no Pants logs
h
I need more context of what you’re doing to answer that. If you’re referring to
--test-output
, that only determines if Pants outputs Pytest’s std{out,err}, not whether we capture it in the first place
f
I’m running the integration test and want to see the logs from the pants run done by the integration test.
which would have the output of the temp directory for the process, correct?
h
Ah. Is the test throwing an exception now, or only the
PantsResult
returned by
run_pants()
has an exit code != 0?
which would have the output of the temp directory for the process
Yeah, it should, so long as you’re using
-ldebug
in the argv for
run_pants()