[llvm] [llvm-lit] Add redirection handling for `env` command without args and write a lit test to check behavior with lit internal shell (PR #106629)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 16:50:45 PDT 2024
================
@@ -746,11 +746,25 @@ def _executeShCmd(cmd, shenv, results, timeoutHelper):
env_str = "\n".join(
f"{key}={value}" for key, value in sorted(cmd_shenv.env.items())
)
- results.append(
- ShellCommandResult(
- j, env_str, "", 0, timeoutHelper.timeoutReached(), []
- )
+ # Process redirections.
+ stdin, stdout, stderr = processRedirects(
+ j, default_stdin, cmd_shenv, opened_files
)
+ if stdout != default_stdin:
----------------
arichardson wrote:
Is this always true? I admit I didn't try to understand all of processRedirects, but it doesn't look like the input argument is ever returned for `stdout`?
https://github.com/llvm/llvm-project/pull/106629
More information about the llvm-commits
mailing list