[numexpr] 04/04: New patch to skip all tests related to threading on sparc
Antonio Valentino
a_valentino-guest at moszumanska.debian.org
Sun Dec 8 12:48:13 UTC 2013
This is an automated email from the git hooks/post-receive script.
a_valentino-guest pushed a commit to branch master
in repository numexpr.
commit 5240106b7ec4cc58ed9a136af124e8cce1dfe4a9
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date: Sun Dec 8 12:36:37 2013 +0000
New patch to skip all tests related to threading on sparc
---
debian/changelog | 2 +
.../0002-skip-threading-tests-on-sparc.patch | 72 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 75 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 41b977d..01af072 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ numexpr (2.2.2-3) UNRELEASED; urgency=medium
* debian/patches
- dropped patch: 0002-relax-test-on-sparc.patch
It does not actually fix the issue.
+ - new patch 0002-skip-threading-tests-on-sparc.patch
+ Skip all tests related to threading on sparc
-- Antonio Valentino <antonio.valentino at tiscali.it> Sun, 08 Dec 2013 12:12:48 +0000
diff --git a/debian/patches/0002-skip-threading-tests-on-sparc.patch b/debian/patches/0002-skip-threading-tests-on-sparc.patch
new file mode 100644
index 0000000..ffa1289
--- /dev/null
+++ b/debian/patches/0002-skip-threading-tests-on-sparc.patch
@@ -0,0 +1,72 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sun, 8 Dec 2013 12:32:28 +0000
+Subject: Skip tests related to threading on sparc
+
+---
+ numexpr/tests/test_numexpr.py | 39 +++++++++++++++++++++------------------
+ 1 file changed, 21 insertions(+), 18 deletions(-)
+
+diff --git a/numexpr/tests/test_numexpr.py b/numexpr/tests/test_numexpr.py
+index 3b4ba80..8ccd40a 100644
+--- a/numexpr/tests/test_numexpr.py
++++ b/numexpr/tests/test_numexpr.py
+@@ -10,6 +10,7 @@
+
+ import os
+ import sys
++import platform
+ import warnings
+
+ import numpy
+@@ -279,23 +280,24 @@ class test_evaluate(TestCase):
+ else:
+ self.fail()
+
+- # Execution order set here so as to not use too many threads
+- # during the rest of the execution. See #33 for details.
+- def test_changing_nthreads_00_inc(self):
+- a = linspace(-1, 1, 1e6)
+- b = ((.25*a + .75)*a - 1.5)*a - 2
+- for nthreads in range(1,7):
+- numexpr.set_num_threads(nthreads)
+- c = evaluate("((.25*a + .75)*a - 1.5)*a - 2")
+- assert_array_almost_equal(b, c)
+-
+- def test_changing_nthreads_01_dec(self):
+- a = linspace(-1, 1, 1e6)
+- b = ((.25*a + .75)*a - 1.5)*a - 2
+- for nthreads in range(6, 1, -1):
+- numexpr.set_num_threads(nthreads)
+- c = evaluate("((.25*a + .75)*a - 1.5)*a - 2")
+- assert_array_almost_equal(b, c)
++ if 'sparc' not in platform.machine():
++ # Execution order set here so as to not use too many threads
++ # during the rest of the execution. See #33 for details.
++ def test_changing_nthreads_00_inc(self):
++ a = linspace(-1, 1, 1e6)
++ b = ((.25*a + .75)*a - 1.5)*a - 2
++ for nthreads in range(1,7):
++ numexpr.set_num_threads(nthreads)
++ c = evaluate("((.25*a + .75)*a - 1.5)*a - 2")
++ assert_array_almost_equal(b, c)
++
++ def test_changing_nthreads_01_dec(self):
++ a = linspace(-1, 1, 1e6)
++ b = ((.25*a + .75)*a - 1.5)*a - 2
++ for nthreads in range(6, 1, -1):
++ numexpr.set_num_threads(nthreads)
++ c = evaluate("((.25*a + .75)*a - 1.5)*a - 2")
++ assert_array_almost_equal(b, c)
+
+
+ tests = [
+@@ -767,7 +769,8 @@ def suite():
+
+ for n in range(niter):
+ theSuite.addTest(unittest.makeSuite(test_numexpr))
+- theSuite.addTest(unittest.makeSuite(test_numexpr2))
++ if 'sparc' not in platform.machine():
++ theSuite.addTest(unittest.makeSuite(test_numexpr2))
+ theSuite.addTest(unittest.makeSuite(test_evaluate))
+ theSuite.addTest(unittest.makeSuite(TestExpressions))
+ theSuite.addTest(unittest.makeSuite(test_int32_int64))
diff --git a/debian/patches/series b/debian/patches/series
index dbfc991..0e41ec3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
0001-debian-changes-1.3.1-1.patch
+0002-skip-threading-tests-on-sparc.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/numexpr.git
More information about the debian-science-commits
mailing list