Rev 5107: Merge 2.1 into 2.2 including fix for skip criteria for bzrlib.tests.test_setup in http://bazaar.launchpad.net/~vila/bzr/2.2-integration/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Nov 5 08:48:26 GMT 2010


At http://bazaar.launchpad.net/~vila/bzr/2.2-integration/

------------------------------------------------------------
revno: 5107 [merge]
revision-id: v.ladeuil+lp at free.fr-20101105084824-77z0u9k47eyya5a2
parent: pqm at pqm.ubuntu.com-20101104150253-a8znhue0d92qlhg1
parent: pqm at pqm.ubuntu.com-20101015030427-70zuki5lqgsnejtb
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 2.2.2-dev
timestamp: Fri 2010-11-05 09:48:24 +0100
message:
  Merge 2.1 into 2.2 including fix for skip criteria for bzrlib.tests.test_setup
modified:
  bzrlib/tests/test_setup.py     test_setup.py-20051208073730-4a59a6368c4efa04
-------------- next part --------------
=== modified file 'bzrlib/tests/test_setup.py'
--- a/bzrlib/tests/test_setup.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/test_setup.py	2010-10-14 21:34:47 +0000
@@ -43,8 +43,11 @@
         This tests that the build process and man generator run correctly.
         It also can catch new subdirectories that weren't added to setup.py.
         """
-        if not os.path.isfile('setup.py'):
-            raise TestSkipped('There is no setup.py file in current directory')
+        # setup.py must be run from the root source directory, but the tests
+        # are not necessarily invoked from there
+        self.source_dir = os.path.dirname(os.path.dirname(bzrlib.__file__))
+        if not os.path.isfile(os.path.join(self.source_dir, 'setup.py')):
+            raise TestSkipped('There is no setup.py file adjacent to the bzrlib directory')
         try:
             import distutils.sysconfig
             makefile_path = distutils.sysconfig.get_makefile_filename()
@@ -56,9 +59,6 @@
                               ' Usually this can be found by installing "python-dev"')
         self.log('test_build running in %s' % os.getcwd())
         install_dir = osutils.mkdtemp()
-        # setup.py must be run from the root source directory, but the tests
-        # are not necessarily invoked from there
-        self.source_dir = os.path.dirname(os.path.dirname(bzrlib.__file__))
         try:
             self.run_setup(['clean'])
             # build is implied by install



More information about the bazaar-commits mailing list