[all-commits] [llvm/llvm-project] bb8b9a: [Utils] Add new --update-tests flag to llvm-lit (#...

Henrik G. Olsson via All-commits all-commits at lists.llvm.org
Tue Oct 1 15:57:31 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bb8b9ac0ba5382bcf02f614b5b3a84c3699cf52c
      https://github.com/llvm/llvm-project/commit/bb8b9ac0ba5382bcf02f614b5b3a84c3699cf52c
  Author: Henrik G. Olsson <hnrklssn at gmail.com>
  Date:   2024-10-01 (Tue, 01 Oct 2024)

  Changed paths:
    M clang/test/lit.cfg.py
    M llvm/docs/CommandGuide/lit.rst
    M llvm/test/lit.cfg.py
    M llvm/utils/lit/lit/LitConfig.py
    M llvm/utils/lit/lit/TestRunner.py
    M llvm/utils/lit/lit/cl_arguments.py
    M llvm/utils/lit/lit/llvm/config.py
    M llvm/utils/lit/lit/main.py
    M llvm/utils/update_any_test_checks.py

  Log Message:
  -----------
  [Utils] Add new --update-tests flag to llvm-lit (#108425)

This adds a flag to lit for detecting and updating failing tests when
possible to do so automatically. The flag uses a plugin architecture
where config files can add additional auto-updaters for the types of
tests in the test suite. When a test fails with `--update-tests` enabled
lit passes the test RUN invocation and output to each registered test
updater until one of them signals that it updated the test (or all test
updaters have been run). As such it is the responsibility of the test
updater to only update tests where it is reasonably certain that it will
actually fix the test, or come close to doing so.

Initially adds support for UpdateVerifyTests and UpdateTestChecks. The
flag is currently only implemented for lit's internal shell, so
`--update-tests` implies `LIT_USE_INTERNAL_SHELL=1`.

Builds on work in #97369
Fixes #81320



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list