~aleteoryx/muditaos

325f8696b88353d87bd97aba4497c78148fd61ad — Lucjan Bryndza 4 years ago 2f3e24c
[EGD-6835] Fix UT link errors with inotify

Fix UT linkage error when trying to link with
libiosyscalls with inotify mechanism

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
M enabled_unittests => enabled_unittests +5 -0
@@ 460,6 460,11 @@ TESTS_LIST["catch2-iosyscalls"]="
    VFS linux support;
"
#---------
TESTS_LIST["catch2-vfs-inotify"]="
   Notifier base class test;
   Filtering test;
"
#---------
TESTS_LIST["catch2-cellular-cmux"]="
    TS0170 frame;
"

M module-apps/application-calculator/tests/CMakeLists.txt => module-apps/application-calculator/tests/CMakeLists.txt +4 -2
@@ 10,8 10,10 @@ add_catch2_executable(
        "${CMAKE_CURRENT_SOURCE_DIR}/CalculatorInput_tests.cpp"
        "${CMAKE_CURRENT_SOURCE_DIR}/CalculatorUtility_tests.cpp"
    LIBS
        module-sys
        iosyscalls
        module-apps
        module-utils
        module-vfs
        iosyscalls
    DEPS
        assets
)

M module-db/tests/CMakeLists.txt => module-db/tests/CMakeLists.txt +3 -3
@@ 35,10 35,10 @@ add_catch2_executable(
        common.cpp
        
    LIBS
        module-db
        module-vfs
        module-sys
        iosyscalls
        module-db
    DEPS
        disk_image
        assets
)
add_subdirectory(test-initializer)

M module-db/tests/test-initializer/CMakeLists.txt => module-db/tests/test-initializer/CMakeLists.txt +3 -3
@@ 10,9 10,9 @@ add_catch2_executable(
        "${CMAKE_CURRENT_SOURCE_DIR}/tests-main.cpp"
        
    LIBS
        module-db
        module-vfs
        module-sys
        iosyscalls
        module-db
    DEPS
        disk_image
        assets
)

M module-gui/test/test-catch-text/CMakeLists.txt => module-gui/test/test-catch-text/CMakeLists.txt +2 -3
@@ 20,10 20,9 @@ add_catch2_executable(
                ..
                ../mock/
        LIBS
                module-vfs
                module-gui
                module-sys
                iosyscalls
                module-gui
        DEPS
                assets
                disk_image
)

M module-gui/test/test-catch/CMakeLists.txt => module-gui/test/test-catch/CMakeLists.txt +2 -3
@@ 14,10 14,9 @@ add_catch2_executable(
        INCLUDE
                ..
        LIBS
                module-gui
                module-vfs
                module-sys
                iosyscalls
                module-gui
        DEPS
                assets
                disk_image
)

M module-vfs/CMakeLists.txt => module-vfs/CMakeLists.txt +1 -1
@@ 81,7 81,7 @@ target_include_directories(${PROJECT_NAME}
        ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/fatfs/source
)

target_link_libraries(${PROJECT_NAME} PUBLIC ${TARGET_LIBRARIES} module-bsp module-utils module-sys module-os)
target_link_libraries(${PROJECT_NAME} PUBLIC ${TARGET_LIBRARIES} module-os module-sys module-bsp module-utils)
target_link_libraries(${PROJECT_NAME} PRIVATE littlefs)

if (${ENABLE_TESTS})

M module-vfs/tests/unittest_filesystem_inotify.cpp => module-vfs/tests/unittest_filesystem_inotify.cpp +2 -2
@@ 30,7 30,7 @@ namespace sys
    {};
} // namespace sys

TEST_CASE("vfsinotify: Notifier base class test")
TEST_CASE("Notifier base class test")
{
    using namespace purefs::fs;
    auto svc = std::make_shared<sys::Service>();


@@ 102,7 102,7 @@ TEST_CASE("vfsinotify: Notifier base class test")
    }
}

TEST_CASE("vfsinotify: Filtering test")
TEST_CASE("Filtering test")
{
    using namespace purefs::fs;
    SECTION("Different mask for services")