[libcxx-commits] [libcxx] [lit] Clean up internal shell parse errors with ScriptFatal (PR #68496)
Vlad Serebrennikov via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 10 21:25:24 PDT 2023
================
@@ -1009,15 +1021,18 @@ def formatOutput(title, data, limit=None):
return out
-# Normally returns out, err, exitCode, timeoutInfo.
+# Always either returns the tuple (out, err, exitCode, timeoutInfo) or raises a
+# ScriptFatal exception.
#
# If debug is True (the normal lit behavior), err is empty, and out contains an
# execution trace, including stdout and stderr shown per command executed.
#
# If debug is False (set by some custom lit test formats that call this
# function), out contains only stdout from the script, err contains only stderr
# from the script, and there is no execution trace.
-def executeScriptInternal(test, litConfig, tmpBase, commands, cwd, debug=True):
+def executeScriptInternal(
+ test, litConfig, tmpBase, commands, cwd, debug=True
+) -> typing.Tuple[str, str, int, typing.Optional[str]]:
----------------
Endilll wrote:
I suggest `from typing import Optional, Tuple` to reduce noise in type annotations.
https://github.com/llvm/llvm-project/pull/68496
More information about the libcxx-commits
mailing list