[all-commits] [llvm/llvm-project] aae10a: [NFC][lit] discovery: find_tests_for_inputs: avoid...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Mon Mar 22 05:26:35 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aae10a94ff12d1766e7d5a3ef743ae5fd7b0b60d
      https://github.com/llvm/llvm-project/commit/aae10a94ff12d1766e7d5a3ef743ae5fd7b0b60d
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-03-22 (Mon, 22 Mar 2021)

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

  Log Message:
  -----------
  [NFC][lit] discovery: find_tests_for_inputs: avoid py warning when no suites found

If lit was run on a directory that contained no suites,
then naturally suite[0] will not be there,
and that line would cause python warnings.

So just predicate it with a check that it is there in the first place.


  Commit: ef4b3a4571e26763fca1fdd3aa6f902806111866
      https://github.com/llvm/llvm-project/commit/ef4b3a4571e26763fca1fdd3aa6f902806111866
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-03-22 (Mon, 22 Mar 2021)

  Changed paths:
    M llvm/utils/lit/tests/custom-result-category.py
    M llvm/utils/lit/tests/googletest-format.py
    M llvm/utils/lit/tests/googletest-upstream-format.py
    M llvm/utils/lit/tests/progress-bar.py
    M llvm/utils/lit/tests/reorder.py
    M llvm/utils/lit/tests/shtest-env.py
    M llvm/utils/lit/tests/shtest-format.py
    M llvm/utils/lit/tests/shtest-not.py
    M llvm/utils/lit/tests/shtest-run-at-line.py
    M llvm/utils/lit/tests/shtest-shell.py

  Log Message:
  -----------
  [NFCI][lit] Unbreak more lit self-tests after D98179

All of these depend on the order of tests, so if one runs them twice,
the tests within them will naturally be reordered
using the previous run times, which breaks them.


  Commit: b32fe2b5142e835597a15eb06c59191c4cf51b54
      https://github.com/llvm/llvm-project/commit/b32fe2b5142e835597a15eb06c59191c4cf51b54
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-03-22 (Mon, 22 Mar 2021)

  Changed paths:
    M llvm/utils/lit/tests/Inputs/reorder/.lit_test_times.txt
    A llvm/utils/lit/tests/Inputs/reorder/new-test.txt
    M llvm/utils/lit/tests/reorder.py

  Log Message:
  -----------
  [NFC][lit] Add a test showing that timing data for tests not executed is lost

I.e. when you first run lit on a directory, and then on a single test,
the timing knowledge about anything else other than that single test
is lost. This isn't right.


  Commit: 00881644774d6a7cd0465c2318a43d6849b931c8
      https://github.com/llvm/llvm-project/commit/00881644774d6a7cd0465c2318a43d6849b931c8
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-03-22 (Mon, 22 Mar 2021)

  Changed paths:
    M llvm/utils/lit/lit/Test.py
    A llvm/utils/lit/lit/TestTimes.py
    M llvm/utils/lit/lit/main.py

  Log Message:
  -----------
  [NFC][lit] Extract 'test time' reading/writing into standalone functions

Simply refactor code into reusable functions,
to allow read_test_times() to be reused later.


  Commit: 233db43967359cc5576b6c7629fa4fcd1d87283a
      https://github.com/llvm/llvm-project/commit/233db43967359cc5576b6c7629fa4fcd1d87283a
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-03-22 (Mon, 22 Mar 2021)

  Changed paths:
    M llvm/utils/lit/lit/TestTimes.py
    M llvm/utils/lit/tests/reorder.py

  Log Message:
  -----------
  [lit] Do not forget test times for tests that weren't executed

Even though we have read the times before,
we intentionally forget about it for performance reasons.
But that means we also forget all the times for the tests
that weren't executed this time. This is mildly inconvenient.

So, when recording the new times, first re-read the old times,
and update times for the tests that were executed,
thus preserving all original times, too.


Compare: https://github.com/llvm/llvm-project/compare/46b055287b80...233db4396735


More information about the All-commits mailing list