Skip to content

Commit

Permalink
Merge the lit and unit test suite.
Browse files Browse the repository at this point in the history
Rename `check-llvm-dialects` => `check-llvm-dialects-lit`
Add a new custom target `check-llvm-dialects` that runs both
`check-llvm-dialects-lit` and `check-llvm-dialects-units`.

Run the combined test suite on CI.

While we only use the units test suite for `OpMap` and `OpSet` right
now, it makes sense to have them executed both under a common name.
  • Loading branch information
tsymalla-AMD committed Jan 31, 2024
1 parent daa38d7 commit bbb2893
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ Common options are:
Testing
=======
Run the `check-llvm-dialects` target to run a suite of automated tests.
Run the `check-llvm-dialects-lit` target to run only the lit tests, and
the `check-llvm-dialects-units` to run only the unit tests.
5 changes: 1 addition & 4 deletions docker/dialects.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ WORKDIR /vulkandriver/builds/ci-build
RUN source /vulkandriver/env.sh \
&& cmake --build . --target llvm-dialects-tblgen

# Run the lit test suite.
# Run all test suites.
RUN source /vulkandriver/env.sh \
&& cmake --build . --target check-llvm-dialects -- -v

# Run the unit tests suite.
RUN source /vulkandriver/env.sh \
&& cmake --build . --target check-llvm-dialects-units -v
9 changes: 7 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,21 @@ configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
)

add_lit_testsuite(check-llvm-dialects "Running the llvm-dialects regression tests"
add_lit_testsuite(check-llvm-dialects-lit "Running the llvm-dialects regression tests"
${CMAKE_CURRENT_BINARY_DIR}
${exclude_from_check_all}
DEPENDS ${LLVM_DIALECTS_TEST_DEPENDS}
)
set_target_properties(check-llvm-dialects PROPERTIES FOLDER "Tests")
set_target_properties(check-llvm-dialects-lit PROPERTIES FOLDER "Tests")

add_lit_testsuites(LLVM_DIALECTS ${CMAKE_CURRENT_SOURCE_DIR}
${exclude_from_check_all}
DEPENDS ${LLVM_DIALECTS_TEST_DEPENDS}
)

add_subdirectory(unit)

# Alias for all relevant tests
add_custom_target(check-llvm-dialects
DEPENDS check-llvm-dialects-lit check-llvm-dialects-units
)

0 comments on commit bbb2893

Please sign in to comment.