Rev 5003: (mbp) turn off selftest globally in cmd_selftest in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Feb 3 16:33:52 GMT 2010


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5003 [merge]
revision-id: pqm at pqm.ubuntu.com-20100203163347-hd3o9r24qbgofg7s
parent: pqm at pqm.ubuntu.com-20100203100619-f76bo5y5bd5c14wk
parent: mbp at sourcefrog.net-20100202231302-eig9h651el9givdw
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2010-02-03 16:33:47 +0000
message:
  (mbp) turn off selftest globally in cmd_selftest
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
=== modified file 'NEWS'
--- a/NEWS	2010-02-03 10:06:19 +0000
+++ b/NEWS	2010-02-03 16:33:47 +0000
@@ -28,6 +28,9 @@
 Testing
 *******
 
+* Don't use Apport for errors while loading or running tests.
+  (Martin Pool, #417881)
+
 * Stop sending apport crash files to ``.cache`` in the directory from
   which ``bzr selftest`` was run.  (Martin Pool, #422350)
 

=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2010-01-29 10:36:23 +0000
+++ b/bzrlib/builtins.py	2010-02-02 23:13:02 +0000
@@ -3524,6 +3524,13 @@
 
         # Make deprecation warnings visible, unless -Werror is set
         symbol_versioning.activate_deprecation_warnings(override=False)
+       
+        # Whatever you normally want, for the purposes of running selftest you
+        # probably actually want to see the exception, not to turn it into an
+        # apport failure.  This is specifically turned off again for tests of
+        # apport.  We turn it off here so that eg a SyntaxError loading the
+        # tests is caught.
+        os.environ['APPORT_DISABLE'] = '1'
 
         if cache_dir is not None:
             tree_creator.TreeCreator.CACHE_ROOT = osutils.abspath(cache_dir)




More information about the bazaar-commits mailing list