From 1462a1e15d7fdfd9b7afcc7ec70527fef7060576 Mon Sep 17 00:00:00 2001 From: makise-homura Date: Thu, 23 Jun 2022 20:47:17 +0300 Subject: Tests: check for shlibdeps symbols/shlibs before testing it OS Elbrus 6.x has totally broken dpkg-shlibdeps; 7.1 has a working one, but still no symbols/shdibdeps files, so generated dependencies are also empty. Since this commit, we're checking if these files exist, and if not, we skip the CPackComponentsDEB-components-depend2 test. --- Tests/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 8485f85..dac21b7 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1156,7 +1156,6 @@ if(BUILD_TESTING) "components-source" "components-shlibdeps1" "components-depend1" - "components-depend2" "compression") # Run additional tests if dpkg-shlibdeps is available (and is new enough version) find_program(SHLIBDEPS_EXECUTABLE NAMES dpkg-shlibdeps) @@ -1176,6 +1175,11 @@ if(BUILD_TESTING) list(APPEND DEB_CONFIGURATIONS_TO_TEST "shlibdeps-with-private-lib-failure" "shlibdeps-with-private-lib-success") endif() + # Check if distro has symbols or shlibs data + file(GLOB SHLIBS_FILES_EXIST "/var/lib/dpkg/info/*.shlibs" "/var/lib/dpkg/info/*.symbols") + if(SHLIBS_FILES_EXIST) + list(APPEND DEB_CONFIGURATIONS_TO_TEST "components-depend2") + endif() endif() set(CPackGen "DEB") -- cgit v0.12