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

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 18:51:34 PDT 2022


ychen added inline comments.


================
Comment at: llvm/utils/lit/lit/formats/googletest.py:124
+                        testname = testcase['name'] + '.' + testinfo['name']
+                        header = f"Script:\n--\n{' '.join(cmd)} --gtest_filter={testname}\n--\n"
+                        if 'failures' in testinfo:
----------------
probinson wrote:
> rnk wrote:
> > This command is different from the sharded command. It is possible to construct tests that fail when run together but pass when run in isolation, so this command may not always reproduce failures observable with lit. I'm not sure how to signal that to the user.
> Currently, *all* unitttest functions are run in isolation under lit, but would be run in the same process by someone who just runs the program interactively with no arguments.  It would be best to report exactly what lit did, but I'm not super worried about weird test-function interactions.
I've added a header script for the sharded command if there are any test failures in the shard. The `googletest-format` down below has the output check. @rnk @probinson WDYT?


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