[PATCH] D122251: [lit] Use sharding for GoogleTest format

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 22:57:49 PDT 2022


vitalybuka added inline comments.


================
Comment at: llvm/utils/lit/lit/formats/googletest.py:131
+            shard_envs = '\n'.join([k + '=' + v for k, v in shard_env.items()])
+            return f"Script(shard):\n--\n%s\n%s\n--\n" % (shard_envs, ' '.join(cmd))
+
----------------
ychen wrote:
> vitalybuka wrote:
> > 'Script' used to be convenient oneliner which can be copy/pasted into shell for debugging, now it's not.
> > also GTEST_OUTPUT and GTEST_COLOR are not needed for that purpose.
> `GTEST_SHARD_INDEX`/`GTEST_TOTAL_SHARDS` only have env var version. To be consistent, I made them all env vars. This script is for the failing shard (there is another one for the individual tests down below). If an error could only be reproduced this way, there are some hidden dependencies among tests that are not expected. In practice, I think this script is less used than the one below.
> 
> One option is to output them in one line. At least this is user-friendly on Linux. Does that sound good to you?
I am sorry, you are correct, only env of them.
One liner would be nice
Probably we should drop GTEST_COLOR, GTEST_SHUFFLE and GTEST_OUTPUT that case to make it shorter.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122251



More information about the llvm-commits mailing list