Skip to content

Commit

Permalink
misc (Makefile): Group lit options and allow them to be overriden d…
Browse files Browse the repository at this point in the history
…uring `make` invocation (#3608)

This PR:

- Groups `lit` options as a Makefile variable that can be overridden
during `make` invocation,
  e.g., `make filecheck LIT_OPTIONS="-v --order=smart --timeout=30`
- The default timeout value is 20secs and it is currently provided in
`lit.cfg` since #3590
- the `-vv` option is deprecated, `-v` does what we want.

Based on the discussion
[here](#3590 (comment)).
  • Loading branch information
compor authored Dec 9, 2024
1 parent de40dd5 commit e84955d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ COVERAGE_FILE ?= .coverage
# use different coverage data file per coverage run, otherwise combine complains
TESTS_COVERAGE_FILE = ${COVERAGE_FILE}.tests

# default lit options
LIT_OPTIONS ?= -v --order=smart

# make tasks run all commands in a single shell
.ONESHELL:

Expand Down Expand Up @@ -39,7 +42,7 @@ clean: clean-caches

# run filecheck tests
filecheck:
lit -vv tests/filecheck --order=smart --timeout=20
lit $(LIT_OPTIONS) tests/filecheck

# run pytest tests
pytest:
Expand All @@ -54,7 +57,7 @@ pytest-nb:

# run tests for Toy tutorial
filecheck-toy:
lit -v docs/Toy/examples --order=smart
lit $(LIT_OPTIONS) docs/Toy/examples

pytest-toy:
pytest docs/Toy/toy/tests
Expand Down Expand Up @@ -141,7 +144,7 @@ coverage-tests:

# run coverage over filecheck tests
coverage-filecheck-tests:
lit -v tests/filecheck/ -DCOVERAGE
lit $(LIT_OPTIONS) tests/filecheck/ -DCOVERAGE

# generate html coverage report
coverage-report-html:
Expand Down

0 comments on commit e84955d

Please sign in to comment.