From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8DFCA1382C5 for ; Mon, 30 Nov 2020 09:01:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CB18DE082F; Mon, 30 Nov 2020 09:01:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A659AE082F for ; Mon, 30 Nov 2020 09:01:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A2FBA340E58 for ; Mon, 30 Nov 2020 09:01:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 53C8042C for ; Mon, 30 Nov 2020 09:01:51 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1606726908.4a6e82ab8fdfe2c9c7c2b0398a7c429c56534552.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/synergy/, x11-misc/synergy/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: x11-misc/synergy/files/synergy-1.9.1-gtest.patch x11-misc/synergy/files/synergy-1.9.1-internal-gmock-gtest.patch x11-misc/synergy/files/synergy-1.9.1-test.patch x11-misc/synergy/synergy-1.9.1-r1.ebuild x11-misc/synergy/synergy-1.9.1.ebuild X-VCS-Directories: x11-misc/synergy/ x11-misc/synergy/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 4a6e82ab8fdfe2c9c7c2b0398a7c429c56534552 X-VCS-Branch: master Date: Mon, 30 Nov 2020 09:01:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 346957dd-3348-4f33-a5b2-f5e1c23d0842 X-Archives-Hash: 6e4c0429f0faa10de3397fe7705af1d5 commit: 4a6e82ab8fdfe2c9c7c2b0398a7c429c56534552 Author: Michał Górny gentoo org> AuthorDate: Mon Nov 30 08:59:55 2020 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Nov 30 09:01:48 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a6e82ab x11-misc/synergy: Reenable tests in 1.9.1 Signed-off-by: Michał Górny gentoo.org> x11-misc/synergy/files/synergy-1.9.1-gtest.patch | 28 ------------------ .../files/synergy-1.9.1-internal-gmock-gtest.patch | 23 --------------- x11-misc/synergy/files/synergy-1.9.1-test.patch | 33 ++++++++++++++++++++++ ...ynergy-1.9.1.ebuild => synergy-1.9.1-r1.ebuild} | 32 +++++++++++++++++---- 4 files changed, 60 insertions(+), 56 deletions(-) diff --git a/x11-misc/synergy/files/synergy-1.9.1-gtest.patch b/x11-misc/synergy/files/synergy-1.9.1-gtest.patch deleted file mode 100644 index f7a5e614e81..00000000000 --- a/x11-misc/synergy/files/synergy-1.9.1-gtest.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/src/lib/synergy/KeyMap.h -+++ b/src/lib/synergy/KeyMap.h -@@ -24,7 +24,9 @@ - #include "common/stdset.h" - #include "common/stdvector.h" - -+#if WITH_GENTOO_TEST - #include -+#endif - - namespace synergy { - -@@ -327,6 +329,7 @@ - //@} - - -+#if WITH_GENTOO_TEST - private: - FRIEND_TEST(KeyMapTests, - findBestKey_requiredDown_matchExactFirstItem); -@@ -341,6 +344,7 @@ - FRIEND_TEST(KeyMapTests, - findBestKey_onlyOneRequiredDown_matchTwoRequiredChangesItem); - FRIEND_TEST(KeyMapTests, findBestKey_noRequiredDown_cannotMatch); -+#endif - - private: - //! Ways to synthesize a key diff --git a/x11-misc/synergy/files/synergy-1.9.1-internal-gmock-gtest.patch b/x11-misc/synergy/files/synergy-1.9.1-internal-gmock-gtest.patch deleted file mode 100644 index bc8a9613057..00000000000 --- a/x11-misc/synergy/files/synergy-1.9.1-internal-gmock-gtest.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/src/test/CMakeLists.txt -+++ b/src/test/CMakeLists.txt -@@ -14,20 +14,5 @@ - # You should have received a copy of the GNU General Public License - # along with this program. If not, see . - --include_directories( -- ../../ext/gtest -- ../../ext/gtest/include -- ../../ext/gmock -- ../../ext/gmock/include) -- --add_library(gtest STATIC ../../ext/gtest/src/gtest-all.cc) --add_library(gmock STATIC ../../ext/gmock/src/gmock-all.cc) -- --if (UNIX) -- # ignore warnings in gtest and gmock -- set_target_properties(gtest PROPERTIES COMPILE_FLAGS "-w") -- set_target_properties(gmock PROPERTIES COMPILE_FLAGS "-w") --endif() -- - add_subdirectory(integtests) - add_subdirectory(unittests) diff --git a/x11-misc/synergy/files/synergy-1.9.1-test.patch b/x11-misc/synergy/files/synergy-1.9.1-test.patch new file mode 100644 index 00000000000..d0c44e9dd7f --- /dev/null +++ b/x11-misc/synergy/files/synergy-1.9.1-test.patch @@ -0,0 +1,33 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index ab63a06..ec7a3e0 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -22,3 +22,8 @@ add_subdirectory(cmd) + if (SYNERGY_BUILD_LEGACY_GUI) + add_subdirectory(gui) + endif (SYNERGY_BUILD_LEGACY_GUI) ++ ++option(BUILD_TESTS "Build tests" OFF) ++if (BUILD_TESTS) ++ add_subdirectory(test) ++endif() +diff --git a/src/test/integtests/CMakeLists.txt b/src/test/integtests/CMakeLists.txt +index f39968a..bfc886c 100644 +--- a/src/test/integtests/CMakeLists.txt ++++ b/src/test/integtests/CMakeLists.txt +@@ -68,4 +68,4 @@ endif() + + add_executable(integtests ${sources}) + target_link_libraries(integtests +- arch base client common io ipc mt net platform server synergy gtest gmock ${libs} ${OPENSSL_LIBS}) ++ arch base client common io ipc mt net platform server gtest gmock ${libs} ${OPENSSL_LIBS}) +diff --git a/src/test/unittests/CMakeLists.txt b/src/test/unittests/CMakeLists.txt +index 54131eb..ef84dba 100644 +--- a/src/test/unittests/CMakeLists.txt ++++ b/src/test/unittests/CMakeLists.txt +@@ -68,4 +68,4 @@ endif() + + add_executable(unittests ${sources}) + target_link_libraries(unittests +- arch base client server common io net platform server synergy mt ipc gtest gmock shared ${libs} ${OPENSSL_LIBS}) ++ arch base client server common io net platform server mt ipc gtest gmock shared ${libs} ${OPENSSL_LIBS}) diff --git a/x11-misc/synergy/synergy-1.9.1.ebuild b/x11-misc/synergy/synergy-1.9.1-r1.ebuild similarity index 76% rename from x11-misc/synergy/synergy-1.9.1.ebuild rename to x11-misc/synergy/synergy-1.9.1-r1.ebuild index 0c5c3b75592..021b8d2d54b 100644 --- a/x11-misc/synergy/synergy-1.9.1.ebuild +++ b/x11-misc/synergy/synergy-1.9.1-r1.ebuild @@ -3,7 +3,7 @@ EAPI=6 -inherit cmake-utils desktop gnome2-utils +inherit cmake-utils desktop gnome2-utils virtualx DESCRIPTION="Lets you easily share a single mouse and keyboard between multiple computers" HOMEPAGE="https://symless.com/synergy https://github.com/symless/synergy-core" @@ -15,8 +15,8 @@ SRC_URI=" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x86-solaris" -IUSE="libressl qt5" -RESTRICT="test" +IUSE="libressl qt5 test" +RESTRICT="!test? ( test )" S=${WORKDIR}/${PN}-core-${PV}-stable @@ -53,21 +53,43 @@ DOCS=( ChangeLog doc/synergy.conf.example{,-advanced,-basic} ) PATCHES=( "${FILESDIR}"/${P}-pthread.patch - "${FILESDIR}"/${P}-internal-gmock-gtest.patch - "${FILESDIR}"/${P}-gtest.patch "${FILESDIR}"/${P}-cmake-version.patch "${FILESDIR}"/${P}-qt-5.11.patch + "${FILESDIR}"/${P}-test.patch ) +src_prepare() { + # requires Internet, and relies on old site anyway + rm src/test/integtests/arch/ArchInternetTests.cpp || die + # broken on Xvfb + rm src/test/integtests/platform/XWindowsScreenTests.cpp || die + + cmake-utils_src_prepare +} + src_configure() { + # otherwise unit tests segfault + local -x CFLAGS="${CFLAGS} -O0" + local -x CXXFLAGS="${CXXFLAGS} -O0" + local mycmakeargs=( -DSYNERGY_BUILD_LEGACY_GUI=$(usex qt5) -DSYNERGY_BUILD_LEGACY_INSTALLER=OFF + -DBUILD_TESTS=$(usex test) ) cmake-utils_src_configure } +my_test() { + "${BUILD_DIR}"/bin/unittests && + "${BUILD_DIR}"/bin/integtests +} + +src_test() { + virtx my_test +} + src_install() { dobin "${BUILD_DIR}"/bin/{synergy{c,s},syntool}