Skip to content

Commit

Permalink
tests: fix spiral test result ...
Browse files Browse the repository at this point in the history
... also disable the tests when building inside the source directory to
avoid issues
  • Loading branch information
liushuyu committed Feb 18, 2025
1 parent 0ed9a41 commit 8a54942
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,12 @@ endif()
add_subdirectory(externals/eternal)
target_link_libraries(autobuild PRIVATE eternal)

enable_testing()
add_subdirectory(tests)
if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
message(WARNING "Unit tests and integration tests are disabled when not using separate build directory")
else()
enable_testing()
add_subdirectory(tests)
endif()

if (NOT LIBELF_FOUND)
message(STATUS "libelf not found on the system, falling back to external version")
Expand Down
2 changes: 1 addition & 1 deletion tests/test-ab4-spiral.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ else
fi

abspiral_from_sonames libQt5QuickParticles.so.5
if [[ "${__ABSPIRAL_PROVIDES_SONAMES[*]}" = 'libqt5quickparticles5 libqt5quickparticles5-gles qtdeclarative5-dev' ]]; then
if [[ "${__ABSPIRAL_PROVIDES_SONAMES[*]}" = 'libqt5quickparticles5-gles libqt5quickparticles5 qtdeclarative5-dev' ]]; then
echo "Spiral test passed."
else
echo "Inferred names: ${__ABSPIRAL_PROVIDES_SONAMES[*]}"
Expand Down

0 comments on commit 8a54942

Please sign in to comment.