[yade] 01/03: Fix autopkgtests.

Anton Gladky gladk at moszumanska.debian.org
Wed Jul 23 05:09:49 UTC 2014


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to branch master
in repository yade.

commit 9d3fe99395d5bccaba0ced18dd94948a0726247b
Author: Anton Gladky <gladk at debian.org>
Date:   Tue Jul 22 21:58:53 2014 +0200

    Fix autopkgtests.
---
 debian/patches/02_redirect_stdout.patch | 47 +++++++++++++++++++++++++++++++++
 debian/patches/03_redirect_stdout.patch | 25 ++++++++++++++++++
 debian/patches/series                   |  2 ++
 3 files changed, 74 insertions(+)

diff --git a/debian/patches/02_redirect_stdout.patch b/debian/patches/02_redirect_stdout.patch
new file mode 100644
index 0000000..e9ac5db
--- /dev/null
+++ b/debian/patches/02_redirect_stdout.patch
@@ -0,0 +1,47 @@
+From 1356ced2bdf4092d675084dec7970e68fcfcd471 Mon Sep 17 00:00:00 2001
+From: Anton Gladky <gladky.anton at gmail.com>
+Date: Tue, 22 Jul 2014 18:42:23 +0200
+Subject: [PATCH] Redirect --test output into stdout
+
+By default in unittest is used stderr, that is
+why autopkgtests are failing in Debian [1].
+
+http://ci.debian.net/data/packages/unstable/amd64/y/yade/20140720_182020.autopkgtest.log
+---
+ py/tests/__init__.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/py/tests/__init__.py b/py/tests/__init__.py
+index a27f9a5..853284e 100644
+--- a/py/tests/__init__.py
++++ b/py/tests/__init__.py
+@@ -1,7 +1,7 @@
+ # encoding: utf-8
+ # 2009 © Václav Šmilauer <eudoxos at arcig.cz>
+ """All defined functionality tests for yade."""
+-import unittest,inspect
++import unittest,inspect,sys
+ 
+ # add any new test suites to the list here, so that they are picked up by testAll
+ allTests=['wrapper','core','pbc','clump','cohesive-chain']
+@@ -25,7 +25,7 @@ def testModule(module):
+ 	@param module: fully-qualified module name, e.g. yade.tests.wrapper
+ 	"""
+ 	suite=unittest.defaultTestLoader().loadTestsFromName(module)
+-	return unittest.TextTestRunner(verbosity=2).run(suite)
++	return unittest.TextTestRunner(stream=sys.stdout,verbosity=2).run(suite)
+ 
+ def testAll():
+ 	"""Run all tests defined in all yade.tests.* modules and return
+@@ -34,7 +34,7 @@ def testAll():
+ 	import doctest
+ 	for mod in allModules:
+ 		suite.addTest(doctest.DocTestSuite(mod))
+-	return unittest.TextTestRunner(verbosity=2).run(suite)
++	return unittest.TextTestRunner(stream=sys.stdout,verbosity=2).run(suite)
+ 
+ 	
+ 
+-- 
+1.9.3
+
diff --git a/debian/patches/03_redirect_stdout.patch b/debian/patches/03_redirect_stdout.patch
new file mode 100644
index 0000000..fd1b8be
--- /dev/null
+++ b/debian/patches/03_redirect_stdout.patch
@@ -0,0 +1,25 @@
+From 283afb47ed4fdb86047618f0cb3ac892c040ef88 Mon Sep 17 00:00:00 2001
+From: Anton Gladky <gladky.anton at gmail.com>
+Date: Tue, 22 Jul 2014 19:21:38 +0200
+Subject: [PATCH] Change stderr to stdout in greeting message.
+
+---
+ core/main/main.py.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/core/main/main.py.in b/core/main/main.py.in
+index 9f78b27..503aa73 100755
+--- a/core/main/main.py.in
++++ b/core/main/main.py.in
+@@ -121,7 +121,7 @@ elif opts.threads: os.environ['OMP_NUM_THREADS']=str(opts.threads)
+ else: os.environ['OMP_NUM_THREADS']='1'
+ 
+ if __name__ == "__main__": # do not print this while importing yade in other python application
+-	sys.stderr.write('Welcome to Yade '+version+debugbuild+'\n')
++	sys.stdout.write('Welcome to Yade '+version+debugbuild+'\n')
+ 
+ # initialization and c++ plugins import
+ import yade
+-- 
+1.9.3
+
diff --git a/debian/patches/series b/debian/patches/series
index b4e6505..cabe29e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
 01_remove_google_analytics.patch
+02_redirect_stdout.patch
+03_redirect_stdout.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/yade.git



More information about the debian-science-commits mailing list