[all-commits] [llvm/llvm-project] 2866f9: [lit] Fix handling of various keyword parse errors

Joel E. Denny via All-commits all-commits at lists.llvm.org
Fri Jun 12 06:38:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2866f9db9e5e9d2e6c14ae179c49c2f1a35bca90
      https://github.com/llvm/llvm-project/commit/2866f9db9e5e9d2e6c14ae179c49c2f1a35bca90
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M llvm/utils/lit/lit/TestRunner.py
    A llvm/utils/lit/tests/Inputs/shtest-keyword-parse-errors/empty.txt
    A llvm/utils/lit/tests/Inputs/shtest-keyword-parse-errors/lit.cfg
    A llvm/utils/lit/tests/Inputs/shtest-keyword-parse-errors/multiple-allow-retries.txt
    A llvm/utils/lit/tests/Inputs/shtest-keyword-parse-errors/unterminated-run.txt
    A llvm/utils/lit/tests/shtest-keyword-parse-errors.py
    M llvm/utils/lit/tests/unit/TestRunner.py

  Log Message:
  -----------
  [lit] Fix handling of various keyword parse errors

In TestRunner.py, D78589 extracts a `_parseKeywords` function from
`parseIntegratedTestScript`, which then expects `_parseKeywords` to
always return a list of keyword/value pairs.  However, the extracted
code sometimes returns an unresolved `lit.Test.Result` on a keyword
parsing error, which then produces a stack dump instead of the
expected diagnostic.

This patch fixes that, makes the style of those diagnostics more
consistent, and extends the lit test suite to cover them.

Reviewed By: ldionne

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




More information about the All-commits mailing list