diff options
author | Alexis Ballier <aballier@gentoo.org> | 2020-08-05 18:52:15 +0200 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2020-08-05 19:55:01 +0200 |
commit | a1e4828e2ba563dbf0aa151d1a1451171e759b38 (patch) | |
tree | 1c8ff5f7c302c27c1c5477a4495fdcfc8d72103b /dev-ros/unique_id | |
parent | dev-ros/test_roscpp: fix tests (diff) | |
download | gentoo-a1e4828e2ba563dbf0aa151d1a1451171e759b38.tar.gz gentoo-a1e4828e2ba563dbf0aa151d1a1451171e759b38.tar.bz2 gentoo-a1e4828e2ba563dbf0aa151d1a1451171e759b38.zip |
dev-ros/unique_id: fix tests
Closes: https://bugs.gentoo.org/734686
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'dev-ros/unique_id')
-rw-r--r-- | dev-ros/unique_id/files/tests.patch | 17 | ||||
-rw-r--r-- | dev-ros/unique_id/unique_id-1.0.6.ebuild | 7 | ||||
-rw-r--r-- | dev-ros/unique_id/unique_id-9999.ebuild | 7 |
3 files changed, 31 insertions, 0 deletions
diff --git a/dev-ros/unique_id/files/tests.patch b/dev-ros/unique_id/files/tests.patch new file mode 100644 index 000000000000..b64a1be5e38b --- /dev/null +++ b/dev-ros/unique_id/files/tests.patch @@ -0,0 +1,17 @@ +Index: unique_id/tests/test_unique_id.py +=================================================================== +--- unique_id.orig/tests/test_unique_id.py ++++ unique_id/tests/test_unique_id.py +@@ -20,10 +20,10 @@ class TestPythonUUID(unittest.TestCase): + def test_random_uuids(self): + N = 1000 + uu = [] +- for i in xrange(N): ++ for i in range(N): + uu.append(fromRandom()) + self.assertEqual(type(uu[i]), uuid.UUID) +- for j in xrange(i-1, -1, -1): ++ for j in range(i-1, -1, -1): + self.assertNotEqual(uu[i], uu[j]) + + # UUID generation from URL tests diff --git a/dev-ros/unique_id/unique_id-1.0.6.ebuild b/dev-ros/unique_id/unique_id-1.0.6.ebuild index 3614a9ea3228..32432dfa5632 100644 --- a/dev-ros/unique_id/unique_id-1.0.6.ebuild +++ b/dev-ros/unique_id/unique_id-1.0.6.ebuild @@ -25,3 +25,10 @@ DEPEND="${RDEPEND} dev-cpp/gtest $(python_gen_cond_dep "dev-python/nose[\${PYTHON_USEDEP}]") )" +PATCHES=( "${FILESDIR}/tests.patch" ) + +src_test() { + # Those tests fail and are commented as undefined behavior in the code + export GTEST_FILTER='-BoostUUID.fromUrnString:BoostUUID.fromTooLongString:BoostUUID2.fromUrnString:BoostUUID2.fromTooLongString' + ros-catkin_src_test +} diff --git a/dev-ros/unique_id/unique_id-9999.ebuild b/dev-ros/unique_id/unique_id-9999.ebuild index 3614a9ea3228..32432dfa5632 100644 --- a/dev-ros/unique_id/unique_id-9999.ebuild +++ b/dev-ros/unique_id/unique_id-9999.ebuild @@ -25,3 +25,10 @@ DEPEND="${RDEPEND} dev-cpp/gtest $(python_gen_cond_dep "dev-python/nose[\${PYTHON_USEDEP}]") )" +PATCHES=( "${FILESDIR}/tests.patch" ) + +src_test() { + # Those tests fail and are commented as undefined behavior in the code + export GTEST_FILTER='-BoostUUID.fromUrnString:BoostUUID.fromTooLongString:BoostUUID2.fromUrnString:BoostUUID2.fromTooLongString' + ros-catkin_src_test +} |