Skip to content

Commit bbb2893

Browse files
committed
Merge the lit and unit test suite.
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.
1 parent daa38d7 commit bbb2893

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ Common options are:
4343
Testing
4444
=======
4545
Run the `check-llvm-dialects` target to run a suite of automated tests.
46+
Run the `check-llvm-dialects-lit` target to run only the lit tests, and
47+
the `check-llvm-dialects-units` to run only the unit tests.

docker/dialects.Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ WORKDIR /vulkandriver/builds/ci-build
3838
RUN source /vulkandriver/env.sh \
3939
&& cmake --build . --target llvm-dialects-tblgen
4040

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

45-
# Run the unit tests suite.
46-
RUN source /vulkandriver/env.sh \
47-
&& cmake --build . --target check-llvm-dialects-units -v

test/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,21 @@ configure_lit_site_cfg(
4040
${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
4141
)
4242

43-
add_lit_testsuite(check-llvm-dialects "Running the llvm-dialects regression tests"
43+
add_lit_testsuite(check-llvm-dialects-lit "Running the llvm-dialects regression tests"
4444
${CMAKE_CURRENT_BINARY_DIR}
4545
${exclude_from_check_all}
4646
DEPENDS ${LLVM_DIALECTS_TEST_DEPENDS}
4747
)
48-
set_target_properties(check-llvm-dialects PROPERTIES FOLDER "Tests")
48+
set_target_properties(check-llvm-dialects-lit PROPERTIES FOLDER "Tests")
4949

5050
add_lit_testsuites(LLVM_DIALECTS ${CMAKE_CURRENT_SOURCE_DIR}
5151
${exclude_from_check_all}
5252
DEPENDS ${LLVM_DIALECTS_TEST_DEPENDS}
5353
)
5454

5555
add_subdirectory(unit)
56+
57+
# Alias for all relevant tests
58+
add_custom_target(check-llvm-dialects
59+
DEPENDS check-llvm-dialects-lit check-llvm-dialects-units
60+
)

0 commit comments

Comments
 (0)