blob: 0855520d1b9c2dd6e3dfec9e33dd862f3c4e0afb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#[============================================================================[
# Kernel Test Support (Fakes, Stubs, Mocks, etc.)
#]============================================================================]
add_library("kernel_test_support"
"kapi/cio.cpp"
"kapi/cpu.cpp"
"kapi/interrupts.cpp"
"kapi/memory.cpp"
"src/log_buffer.cpp"
"src/main.cpp"
"src/simulated_memory.cpp"
)
file(GLOB_RECURSE KERNEL_TEST_SUPPORT_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "include/**.hpp")
target_sources("kernel_test_support" PUBLIC
FILE_SET HEADERS
BASE_DIRS "include"
FILES
${KERNEL_TEST_SUPPORT_HEADERS}
)
target_include_directories("kernel_test_support" PUBLIC
"include"
)
target_link_libraries("kernel_test_support" PUBLIC
"os::kapi"
"os::kernel"
"Catch2::Catch2"
)
add_library("os::kernel_test_support" ALIAS "kernel_test_support")
#[============================================================================[
# Kernel Tests
#]============================================================================]
add_executable("kernel_tests"
"src/test_support.tests.cpp"
)
target_include_directories("kernel_tests" PRIVATE
"include"
)
target_link_libraries("kernel_tests" PRIVATE
"os::kernel_test_support"
"libs::kstd"
)
set_target_properties("kernel_tests" PROPERTIES
C_CLANG_TIDY ""
CXX_CLANG_TIDY ""
EXCLUDE_FROM_ALL NO
)
enable_coverage("kernel_tests")
add_executable("os::kernel_tests" ALIAS "kernel_tests")
catch_discover_tests("os::kernel_tests")
|