[all-commits] [llvm/llvm-project] 23f896: [lit] Update local test objects "in place" from re...

Julian Lettner via All-commits all-commits at lists.llvm.org
Mon Apr 13 21:06:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 23f896a096c378a2eeeb348fa15027135c828ce8
      https://github.com/llvm/llvm-project/commit/23f896a096c378a2eeeb348fa15027135c828ce8
  Author: Julian Lettner <julian.lettner at apple.com>
  Date:   2020-04-13 (Mon, 13 Apr 2020)

  Changed paths:
    M llvm/utils/lit/lit/run.py

  Log Message:
  -----------
  [lit] Update local test objects "in place" from remote test objects

Update local test object "in place" from remote test object.  We need to
do this to ensure that discovered test object which is used for printing
test results reflect the changes.

> Why are we sending back the whole test object from the worker process
> (lit.worker.execute) instead of just the result?

Unfortunately, the test result is not the only "result" of test
execution.  Other members (e.g., xfails, requires) of the Test class are
set only during execution.  Those members affect the behavior of
`isExpectedToFail` and `setResult`, and are accessed when printing
results.  For example, xunit.xml test results include missing features
for "skip reasons".  The lack of separation between an immutable "test
definition" and "generated outputs" (including the primary result and
other secondary state) is unfortunate historical design decision in lit.

> Why do we update the initial test object instead of just discarding it
> and continuing with the pickled test object?

Both of these approaches would work.  However, note that we need a fully
populated test object for printing results.  Updating the existing one
seems to be the easier path.




More information about the All-commits mailing list