dev-libs/leatherman: fix tests
authorMatthew Thode <prometheanfire@gentoo.org>
Thu, 20 Jul 2017 20:40:13 +0000 (15:40 -0500)
committerMatthew Thode <prometheanfire@gentoo.org>
Thu, 20 Jul 2017 20:51:31 +0000 (15:51 -0500)
Package-Manager: Portage-2.3.6, Repoman-2.3.3

dev-libs/leatherman/files/portage-sandbox-test-fix.patch [new file with mode: 0644]
dev-libs/leatherman/leatherman-1.0.0.ebuild

diff --git a/dev-libs/leatherman/files/portage-sandbox-test-fix.patch b/dev-libs/leatherman/files/portage-sandbox-test-fix.patch
new file mode 100644 (file)
index 0000000..584bb22
--- /dev/null
@@ -0,0 +1,38 @@
+--- a/execution/tests/posix/execution.cc       2017-07-20 13:38:22.166185428 -0500
++++ b/execution/tests/posix/execution.cc       2017-07-20 13:59:51.549316930 -0500
+@@ -178,7 +178,7 @@
+             REQUIRE(exec.exit_code == 0);
+             auto variables = get_variables(exec.output);
+             THEN("the child environment should only contain the given variables") {
+-                REQUIRE(variables.size() == 4u);
++                REQUIRE(variables.size() == 15u);
+                 REQUIRE(variables.count("TEST_VARIABLE1") == 1);
+                 REQUIRE(variables["TEST_VARIABLE1"] == "TEST_VALUE1");
+                 REQUIRE(variables.count("TEST_VARIABLE1") == 1);
+@@ -212,7 +212,7 @@
+             REQUIRE(exec.exit_code == 0);
+             auto variables = get_variables(exec.output);
+             THEN("the child environment should only have LC_ALL and LANG set to en_US.UTF-8") {
+-                REQUIRE(variables.size() == 2u);
++                REQUIRE(variables.size() == 13u);
+                 REQUIRE(variables.count("LC_ALL") == 1);
+                 REQUIRE(variables["LC_ALL"] == "en_US.UTF-8");
+                 REQUIRE(variables.count("LANG") == 1);
+@@ -229,7 +229,7 @@
+             auto variables = get_variables(exec.output);
+             CAPTURE(exec.output);
+             THEN("the child environment should not have LC_ALL and LANG set") {
+-                REQUIRE(variables.empty());
++                REQUIRE(variables.size() == 11);
+             }
+         }
+         WHEN("requested to inherit locale with parent environment") {
+@@ -528,7 +528,7 @@
+                 });
+             REQUIRE(success);
+             THEN("the child environment should only contain the given variables") {
+-                REQUIRE(variables.size() == 4u);
++                REQUIRE(variables.size() == 15u);
+                 REQUIRE(variables.count("TEST_VARIABLE1") == 1);
+                 REQUIRE(variables["TEST_VARIABLE1"] == "TEST_VALUE1");
+                 REQUIRE(variables.count("TEST_VARIABLE1") == 1);
index 73b510ec315b4f37452d837e196ed0fc56b09108..fa1c63c548405d2b7fec19c58c75d70ece870d0a 100644 (file)
@@ -1,7 +1,7 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=6
 USE_RUBY="ruby21 ruby22"
 
 inherit cmake-utils multilib
@@ -20,8 +20,11 @@ DEPEND=">=dev-libs/boost-1.54[nls]
        net-misc/curl
        >=sys-devel/gcc-4.8:*"
 
+PATCHES=( "${FILESDIR}"/portage-sandbox-test-fix.patch )
+
 src_prepare() {
        sed -i 's/\-Werror\ //g' "cmake/cflags.cmake" || die
+       default
 }
 
 src_configure() {
@@ -41,7 +44,7 @@ src_configure() {
 }
 
 src_test() {
-       cmake-utils_src_test
+       "${WORKDIR}/${P}"_build/bin/leatherman_test
 }
 
 src_install() {