[all-commits] [llvm/llvm-project] d618c6: [lit, test] Fix test cancellation feature detection

RoboTux via All-commits all-commits at lists.llvm.org
Tue Apr 20 04:09:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d618c6e8ceb7e3f08631cd2e6669f9479cdca45d
      https://github.com/llvm/llvm-project/commit/d618c6e8ceb7e3f08631cd2e6669f9479cdca45d
  Author: Thomas Preud'homme <thomasp at graphcore.ai>
  Date:   2021-04-20 (Tue, 20 Apr 2021)

  Changed paths:
    A llvm/utils/lit/tests/check-tested-lit-timeout-ability
    M llvm/utils/lit/tests/lit.cfg

  Log Message:
  -----------
  [lit, test] Fix test cancellation feature detection

A lit feature guards tests for the lit timeout functionality because on
most system it depends on the availability of the psutil Python module.
However, that feature is defined based on the ability of the testing lit
to cancel test, which does not necessarily apply to the ability of the
tested lit.

In particular, RUN commands have a cleared PYTHONPATH and user site
packages are disabled. In the case where psutil is found by the testing
lit from one of those two source of python path, the tested lit would
not be able to find it, causing timeout tests to fail.

This commit fixes the issue by testing the ability to cancel tests in
the RUN command environment.

Reviewed By: yln

Differential Revision: https://reviews.llvm.org/D99728




More information about the All-commits mailing list