From faf1f3c1bc53beebeb608d453631bfbb1ed59999 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Fri, 12 Jan 2024 14:58:04 +0100 Subject: [PATCH] Add protobuf conformance_test_runner installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows running protobuf conformance tests in CI. Task-number: QTBUG-114143 Change-Id: I7596a1848629285f1a06243fc66bfcddec226038 Reviewed-by: MÃ¥rten Nordheim --- .../common/unix/install_protobuf.sh | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/coin/provisioning/common/unix/install_protobuf.sh b/coin/provisioning/common/unix/install_protobuf.sh index 7ace4eae..110d8b9c 100755 --- a/coin/provisioning/common/unix/install_protobuf.sh +++ b/coin/provisioning/common/unix/install_protobuf.sh @@ -31,6 +31,36 @@ DownloadURL "$internalUrl" "$externalUrl" "$sha1" "$targetFile" unzip "$targetFile" -d "$HOME" sudo rm "$targetFile" +cd $targetDir + +if uname -a |grep -q "Ubuntu"; then + echo 'diff --git a/cmake/conformance.cmake b/cmake/conformance.cmake +index d6c435ac3..d6fb3a7df 100644 +--- a/cmake/conformance.cmake ++++ b/cmake/conformance.cmake +@@ -24,6 +24,8 @@ add_executable(conformance_test_runner + ${protobuf_SOURCE_DIR}/conformance/conformance.pb.cc + ${protobuf_SOURCE_DIR}/conformance/conformance_test.cc + ${protobuf_SOURCE_DIR}/conformance/conformance_test_runner.cc ++ ${protobuf_SOURCE_DIR}/conformance/conformance_test_main.cc ++ ${protobuf_SOURCE_DIR}/conformance/text_format_conformance_suite.cc + ${protobuf_SOURCE_DIR}/conformance/third_party/jsoncpp/json.h + ${protobuf_SOURCE_DIR}/conformance/third_party/jsoncpp/jsoncpp.cpp + ${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto2.pb.cc +@@ -36,6 +38,10 @@ add_executable(conformance_cpp + ${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto2.pb.cc + ${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto3.pb.cc + ) ++install(TARGETS conformance_test_runner ++ RUNTIME DESTINATION COMPONENT conformance ++ LIBRARY DESTINATION COMPONENT conformance ++ ARCHIVE DESTINATION COMPONENT conformance) + + target_include_directories( + conformance_test_runner' | patch -p1 + extraCMakeArgs=("-Dprotobuf_BUILD_CONFORMANCE=ON") +fi + # devtoolset is needed when running configuration if uname -a |grep -qv "Darwin"; then export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH"