Skip to content

Commit

Permalink
Fix Test Building
Browse files Browse the repository at this point in the history
  • Loading branch information
nlogozzo committed Dec 6, 2023
1 parent f600a09 commit d2f14a2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
working-directory: ${{github.workspace}}/build
run: cmake --install . --prefix "${{github.workspace}}/install"
- name: "CMake Test"
working-directory: ${{github.workspace}}/build/tests
working-directory: ${{github.workspace}}/build
run: ctest
- name: Upload
uses: actions/upload-artifact@v1
Expand Down
18 changes: 16 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if(LINUX)
pkg_check_modules(gthread-2.0 REQUIRED IMPORTED_TARGET gthread-2.0)
pkg_search_module(UUID REQUIRED uuid)
target_include_directories(${PROJECT_NAME} PUBLIC ${UUID_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} PUBLIC libsecret::libsecret PkgConfig::glib-2.0 PkgConfig::gio-2.0 PkgConfig::gmodule-2.0 PkgConfig::gobject-2.0 PkgConfig::gthread-2.0 ${UUID_LIBRARIES} -lresolv)
target_link_libraries(${PROJECT_NAME} PUBLIC resolv libsecret::libsecret PkgConfig::glib-2.0 PkgConfig::gio-2.0 PkgConfig::gmodule-2.0 PkgConfig::gobject-2.0 PkgConfig::gthread-2.0 ${UUID_LIBRARIES})
endif()

#libaura Install
Expand All @@ -72,4 +72,18 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INC
install(FILES ${CMAKE_BINARY_DIR}/libaura.pc DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)

#libaura Tests
add_subdirectory(tests)
enable_testing()

add_executable(${PROJECT_NAME}_test
tests/eventtests.cpp
tests/main.cpp
tests/networktests.cpp
tests/stringtests.cpp
tests/versiontests.cpp
tests/webtests.cpp)

find_package(GTest REQUIRED)
target_link_libraries(${PROJECT_NAME}_test PRIVATE libaura GTest::gtest_main GTest::gmock_main)

include(GoogleTest)
gtest_discover_tests(${PROJECT_NAME}_test)
17 changes: 0 additions & 17 deletions tests/CMakeLists.txt

This file was deleted.

0 comments on commit d2f14a2

Please sign in to comment.