From 06e3d7e45db8edcac37b5ba34837e8ddab4d549f Mon Sep 17 00:00:00 2001 From: Sascha Roloff Date: Tue, 30 May 2023 19:05:56 +0200 Subject: Add testcase for cmake dependencies --- tests/test_cases/deps/TARGETS | 4 +++- tests/test_cases/deps/cmake/TARGETS | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_cases/deps/TARGETS b/tests/test_cases/deps/TARGETS index 909cb4b..10a6749 100644 --- a/tests/test_cases/deps/TARGETS +++ b/tests/test_cases/deps/TARGETS @@ -151,7 +151,7 @@ , "cmake": { "type": ["test_rules", "test_case"] , "name": ["deps_cmake"] - , "libs": ["googletest"] + , "libs": ["googletest", "libz", "libcurl"] , "targets": [ "+gtest" , "+test" @@ -161,6 +161,7 @@ , "+install_gtest" , "+install_gtest_main" , "+install_testbin" + , "+install_libcurl" ] , "asserts": [ "test -f gtest/libgtest.a" @@ -184,6 +185,7 @@ , "grep 'Libs.*libgtest_main.so.1.13.0' install_gtest_main/lib/pkgconfig/gtest_main.pc" , "grep 'Libs.*lib/pkgconfig/gtest_main.ldflags' install_gtest_main/lib/pkgconfig/gtest_main.pc" , "./install_testbin/bin/test | grep 'PASSED.*1 test'" + , "path=$(ldd install_libcurl/lib/libcurl.so.4.8.0 | awk '/libz/{print $3}') && test -z \"${path##$(pwd)*}\"" ] , "data": [["TREE", null, "cmake"]] } diff --git a/tests/test_cases/deps/cmake/TARGETS b/tests/test_cases/deps/cmake/TARGETS index 74633b9..7b3bf6f 100644 --- a/tests/test_cases/deps/cmake/TARGETS +++ b/tests/test_cases/deps/cmake/TARGETS @@ -49,4 +49,32 @@ } , "install_testbin": {"type": ["@", "rules", "CC", "install-with-deps"], "targets": ["testbin"]} +, "libz": + { "type": ["@", "rules", "CC/foreign/cmake", "library"] + , "name": ["libz"] + , "version": ["1", "2", "13"] + , "project": [["@", "libz", "", "tree"]] + , "defines": ["BUILD_SHARED_LIBS=ON"] + , "post_cmds": + [ "cp lib/libz.so.1.2.13 lib/libz.so" + , "cp lib/libz.so.1.2.13 lib/libz.so.1" + ] + , "out_hdrs": ["zconf.h", "zlib.h"] + , "out_libs": ["libz.so", "libz.so.1", "libz.so.1.2.13"] + , "pc_prefix": ["share/pkgconfig"] + , "pkg-config": ["zlib.pc"] + } +, "libcurl": + { "type": ["@", "rules", "CC/foreign/cmake", "library"] + , "name": ["libcurl"] + , "version": ["8", "0", "1"] + , "project": [["@", "libcurl", "", "tree"]] + , "defines": ["BUILD_SHARED_LIBS=ON", "CURL_ENABLE_SSL=OFF", "USE_ZLIB=ON"] + , "out_hdr_dirs": ["curl"] + , "out_libs": ["libcurl.so.4.8.0"] + , "pkg-config": ["libcurl.pc"] + , "deps": ["libz"] + } +, "install_libcurl": + {"type": ["@", "rules", "CC", "install-with-deps"], "targets": ["libcurl"]} } -- cgit v1.2.3