Skip to content

Commit 467c37c

Browse files
committed
fixup! Consolidate tests in a single location
1 parent de27c3a commit 467c37c

28 files changed

+43
-109
lines changed

test/CMakeLists.txt

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,4 @@ add_library(graph_compiler_static STATIC ${GC_LIB_SOURCES})
1010
target_include_directories(graph_compiler_static PUBLIC ${GC_LIB_INCLUDES})
1111

1212
add_subdirectory(dnnl)
13-
14-
llvm_canonicalize_cmake_booleans(
15-
GC_ENABLE_BINDINGS_PYTHON
16-
)
17-
configure_lit_site_cfg(
18-
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
19-
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
20-
MAIN_CONFIG
21-
${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
22-
)
23-
24-
configure_lit_site_cfg(
25-
${CMAKE_CURRENT_SOURCE_DIR}/gc/Unit/lit.site.cfg.py.in
26-
${CMAKE_CURRENT_BINARY_DIR}/gc/Unit/lit.site.cfg.py
27-
MAIN_CONFIG
28-
${CMAKE_CURRENT_SOURCE_DIR}/gc/Unit/lit.cfg.py
29-
)
30-
31-
set(GC_OPT_TEST_DEPENDS
32-
FileCheck count not
33-
# mlir-gen
34-
gc-opt
35-
gc-cpu-runner
36-
GCUnitTests
37-
)
38-
39-
if(GC_ENABLE_BINDINGS_PYTHON)
40-
list(APPEND GC_OPT_TEST_DEPENDS GcPythonModules)
41-
endif()
42-
43-
add_lit_testsuite(gc-check "Running the regression tests"
44-
${CMAKE_CURRENT_BINARY_DIR}
45-
DEPENDS ${GC_OPT_TEST_DEPENDS}
46-
)
47-
48-
# Looks that this property is suitable for IDE
49-
# TODO: Check is this fine for IDE
50-
set_target_properties(gc-check PROPERTIES FOLDER "Tests")
51-
52-
add_lit_testsuites(GC_OPT ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${GC_OPT_TEST_DEPENDS})
53-
54-
add_subdirectory(gc/Unit)
13+
add_subdirectory(mlir)

test/gc/Unit/lit.cfg.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

test/gc/Unit/lit.site.cfg.py.in

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/mlir/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
add_subdirectory(test)
2+
add_subdirectory(unittests)

test/mlir/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# GC Tests
2+
3+
Tests structured the way MLIR part is similar to what one finds in the upstream (`mlir/unittest` for C++ tests and `mlir/test` for lits). These can be invoked by `gc-check` cmake target.
4+
5+
Backend specific tests are separate, gtest-based.

test/mlir/test/CMakeLists.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
llvm_canonicalize_cmake_booleans(
2+
GC_ENABLE_BINDINGS_PYTHON
3+
)
4+
5+
configure_lit_site_cfg(
6+
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
7+
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
8+
MAIN_CONFIG
9+
${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
10+
)
11+
12+
set(GC_OPT_TEST_DEPENDS
13+
FileCheck count not split-file
14+
# mlir-gen
15+
gc-opt
16+
gc-cpu-runner
17+
GCUnitTests
18+
)
19+
20+
if(GC_ENABLE_BINDINGS_PYTHON)
21+
list(APPEND GC_OPT_TEST_DEPENDS GcPythonModules)
22+
endif()
23+
24+
add_lit_testsuite(gc-check "Running the regression tests"
25+
${CMAKE_CURRENT_BINARY_DIR}
26+
DEPENDS ${GC_OPT_TEST_DEPENDS}
27+
)
28+
29+
# Looks that this property is suitable for IDE
30+
# TODO: Check is this fine for IDE
31+
set_target_properties(gc-check PROPERTIES FOLDER "Tests")
32+
33+
add_lit_testsuites(GC_OPT ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${GC_OPT_TEST_DEPENDS})

0 commit comments

Comments
 (0)