Rev 5107: (vila) Merge 2.1 into 2.2 including fix for skip criteria for in file:///home/pqm/archives/thelove/bzr/2.2/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Nov 5 10:03:20 GMT 2010


At file:///home/pqm/archives/thelove/bzr/2.2/

------------------------------------------------------------
revno: 5107 [merge]
revision-id: pqm at pqm.ubuntu.com-20101105100319-o7zkwph6s6vktwie
parent: pqm at pqm.ubuntu.com-20101104150253-a8znhue0d92qlhg1
parent: v.ladeuil+lp at free.fr-20101105084824-77z0u9k47eyya5a2
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 2.2
timestamp: Fri 2010-11-05 10:03:19 +0000
message:
  (vila) Merge 2.1 into 2.2 including fix for skip criteria for
  	bzrlib.tests.test_setup (Vincent Ladeuil)
modified:
  bzrlib/tests/test_setup.py     test_setup.py-20051208073730-4a59a6368c4efa04
=== 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