[Python-modules-commits] r23041 - in packages/python-gdata/trunk/debian (5 files)

mitya57-guest at users.alioth.debian.org mitya57-guest at users.alioth.debian.org
Fri Nov 23 06:38:10 UTC 2012


    Date: Friday, November 23, 2012 @ 06:38:05
  Author: mitya57-guest
Revision: 23041

Run tests during build (closes: #622083)
+ debian/patches/tests_dont_return_zero_on_failures.patch:
  make tests return non-zero value on failures
+ debian/patches/disable_network_test.patch:
  disable test that relies on network connection

Added:
  packages/python-gdata/trunk/debian/patches/disable_network_test.patch
  packages/python-gdata/trunk/debian/patches/tests_dont_return_zero_on_failures.patch
Modified:
  packages/python-gdata/trunk/debian/changelog
  packages/python-gdata/trunk/debian/patches/series
  packages/python-gdata/trunk/debian/rules

Modified: packages/python-gdata/trunk/debian/changelog
===================================================================
--- packages/python-gdata/trunk/debian/changelog	2012-11-22 20:40:06 UTC (rev 23040)
+++ packages/python-gdata/trunk/debian/changelog	2012-11-23 06:38:05 UTC (rev 23041)
@@ -5,6 +5,11 @@
   * Drop fix_wrong_interpreter_path.patch, no longer needed
   * Set priority to optional (instead of extra)
   * Bump debhelper compat level to 9
+  * Run tests during build (closes: #622083)
+    + debian/patches/tests_dont_return_zero_on_failures.patch:
+      make tests return non-zero value on failures
+    + debian/patches/disable_network_test.patch:
+      disable test that relies on network connection
 
  -- Dmitry Shachnev <mitya57 at gmail.com>  Wed, 30 May 2012 13:01:52 +0400
 

Added: packages/python-gdata/trunk/debian/patches/disable_network_test.patch
===================================================================
--- packages/python-gdata/trunk/debian/patches/disable_network_test.patch	                        (rev 0)
+++ packages/python-gdata/trunk/debian/patches/disable_network_test.patch	2012-11-23 06:38:05 UTC (rev 23041)
@@ -0,0 +1,17 @@
+Author: Dmitry Shachnev <mitya57 at gmail.com>
+Description: Disable test that relies on network connection
+Forwarded: not-needed
+Last-Update: 2012-11-23
+
+=== modified file 'tests/run_data_tests.py'
+--- a/tests/run_data_tests.py	2012-03-09 12:29:18 +0000
++++ b/tests/run_data_tests.py	2012-11-23 05:44:41 +0000
+@@ -37,7 +37,6 @@
+   test_runner = module_test_runner.ModuleTestRunner()
+   test_runner.modules = [gdata_test, atom_test, atom_tests.url_test, 
+                          atom_tests.http_interface_test, 
+-                         atom_tests.mock_http_test, 
+                          atom_tests.core_test,
+                          atom_tests.token_store_test,
+                          gdata_tests.client_test,
+

Modified: packages/python-gdata/trunk/debian/patches/series
===================================================================
--- packages/python-gdata/trunk/debian/patches/series	2012-11-22 20:40:06 UTC (rev 23040)
+++ packages/python-gdata/trunk/debian/patches/series	2012-11-23 06:38:05 UTC (rev 23041)
@@ -1 +1,3 @@
 remove_shebangs.patch
+tests_dont_return_zero_on_failures.patch
+disable_network_test.patch

Added: packages/python-gdata/trunk/debian/patches/tests_dont_return_zero_on_failures.patch
===================================================================
--- packages/python-gdata/trunk/debian/patches/tests_dont_return_zero_on_failures.patch	                        (rev 0)
+++ packages/python-gdata/trunk/debian/patches/tests_dont_return_zero_on_failures.patch	2012-11-23 06:38:05 UTC (rev 23041)
@@ -0,0 +1,18 @@
+Author: Dmitry Shachnev <mitya57 at gmail.com>
+Description: Make tests return non-zero value on failures
+Forwarded: not-needed
+Last-Update: 2012-11-23
+
+=== modified file 'tests/module_test_runner.py'
+--- a/tests/module_test_runner.py	2008-07-22 20:52:11 +0000
++++ b/tests/module_test_runner.py	2012-11-23 06:25:39 +0000
+@@ -53,5 +53,6 @@
+           pass
+       # We have set all of the applicable settings for the module, now
+       # run the tests.
+-      print '\nRunning all tests in module', module.__name__
+-      runner.run(unittest.defaultTestLoader.loadTestsFromModule(module))    
++      result = runner.run(unittest.defaultTestLoader.loadTestsFromModule(module))
++      if not result.wasSuccessful():
++        raise Exception('Tests failed!')
+

Modified: packages/python-gdata/trunk/debian/rules
===================================================================
--- packages/python-gdata/trunk/debian/rules	2012-11-22 20:40:06 UTC (rev 23040)
+++ packages/python-gdata/trunk/debian/rules	2012-11-23 06:38:05 UTC (rev 23041)
@@ -15,6 +15,13 @@
 	chmod a-x samples/apps/marketplace_sample/gdata/apps/multidomain/__init__.py
 	dh_auto_build
 
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+override_dh_auto_test:
+	set -ex; for pyversion in $(shell pyversions -vr); do \
+		PYTHONPATH=src python$$pyversion tests/run_data_tests.py; \
+	done	
+endif
+
 override_dh_installchangelogs:
 	dh_installchangelogs RELEASE_NOTES.txt
 




More information about the Python-modules-commits mailing list