[PATCH] D102899: [lit] Print full googletest commad line

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 20 22:19:54 PDT 2021


delcypher added a comment.

The patch seems reasonable. I have a minor nit about the use of the `%` operator but other than that it seems fine.



================
Comment at: llvm/utils/lit/lit/formats/googletest.py:125
 
+        header = "Script:\n--\n%s\n--\n" % ' '.join(cmd)
+
----------------
Minor nit. This patch is mixing the old python string interpolation (`%` operator) and the format function.

Given that Python 3.6 is the minimum maybe we should just use format strings in both places e.g.

```
header = f"Script:\n--\n{' '.join(cmd)}\n--\n"
...
return (lit.test.TIMEOUT, f"{header}Reached timeout of {litConfig.maxIndividualTestTime} seconds")
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102899/new/

https://reviews.llvm.org/D102899



More information about the llvm-commits mailing list