From: Brian Warner Date: Thu, 30 Jul 2009 17:16:15 +0000 (-0700) Subject: test_runner.py: tolerate symlinks in the source tree directory's ancestor path X-Git-Tag: allmydata-tahoe-1.5.0~8 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/nxhtml.html?a=commitdiff_plain;h=0d0e0ba2fb8998641689a3b972c2a99debfd80e1;p=tahoe-lafs%2Ftahoe-lafs.git test_runner.py: tolerate symlinks in the source tree directory's ancestor path --- diff --git a/src/allmydata/test/test_runner.py b/src/allmydata/test/test_runner.py index b436365d..74f1e115 100644 --- a/src/allmydata/test/test_runner.py +++ b/src/allmydata/test/test_runner.py @@ -32,9 +32,12 @@ class TheRightCode(common_util.SignalMixin, unittest.TestCase, out, err, rc_or_sig = res self.failUnlessEqual(rc_or_sig, 0) - # Fail unless the allmydata-tahoe package is *this* version *and* was loaded from *this* source directory. - required_ver_and_path = "allmydata-tahoe: %s (%s)" % (allmydata.__version__, os.path.dirname(os.path.dirname(allmydata.__file__))) - self.failUnless(out.startswith(required_ver_and_path), (out, err, rc_or_sig, required_ver_and_path)) + # Fail unless the allmydata-tahoe package is *this* version *and* + # was loaded from *this* source directory. + ad = os.path.dirname(os.path.dirname(os.path.realpath(allmydata.__file__))) + required_ver_and_path = "allmydata-tahoe: %s (%s)" % (allmydata.__version__, ad) + self.failUnless(out.startswith(required_ver_and_path), + (out, err, rc_or_sig, required_ver_and_path)) d.addCallback(_cb) return d