This is an archive of the discontinued LLVM Phabricator instance.

[lit] Provide consistent stdout and stderr in the internal shell
AbandonedPublic

Authored by ldionne on Jun 15 2020, 3:56 PM.

Details

Reviewers
yln
delcypher
Summary

Before this patch, evaluating commands in the internal shell results in
a (out, err, exitCode, timeoutInfo) quadruple where the standard output
contains a detailed trace of everything that was executed, and where
the standard error doesn't contain anything.

Instead, it should return the standard output/error of the executed
commands, like an external shell would. Otherwise, it is impossible
retrieve the standard output/error when calling executeScriptInternal
without parsing that trace.

Diff Detail

Event Timeline

ldionne created this revision.Jun 15 2020, 3:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2020, 3:56 PM

This is going to require a lot of fixes in Lit's own tests. I'd like to know whether we're interested to proceed this way before I go ahead and fix them.

Note that without this change, it's fairly difficult to extract precise stdout or stderr results after running a command through the internal Shell format, as explained in the commit message. That's the motivation for the change.

I am in favor of this. It might also help with D80694 @varungandhi-apple
Does this change the output for normal test runs (other than for lit itself)?

Please also add the usual lit reviewers when you have the final patch.

ldionne abandoned this revision.Aug 31 2023, 1:07 PM

This was fixed by D156954!

Herald added a project: Restricted Project. · View Herald TranscriptAug 31 2023, 1:07 PM