From: david-sarah Date: Sat, 11 Sep 2010 22:19:13 +0000 (-0700) Subject: test_runner.py: fix spurious failures of test_path on case-insensitive filesystems... X-Git-Tag: allmydata-tahoe-1.8.0c4~4 X-Git-Url: https://git.rkrishnan.org/pf/content/%22file:/frontends/configuration.txt?a=commitdiff_plain;h=b23a7fcc10be8095273e173f6e2d4ce00c72cae0;p=tahoe-lafs%2Ftahoe-lafs.git test_runner.py: fix spurious failures of test_path on case-insensitive filesystems, and restore the check that the version is not 'unknown'. --- diff --git a/src/allmydata/test/test_runner.py b/src/allmydata/test/test_runner.py index 75009cb6..e735fe71 100644 --- a/src/allmydata/test/test_runner.py +++ b/src/allmydata/test/test_runner.py @@ -86,6 +86,10 @@ class BinTahoe(common_util.SignalMixin, unittest.TestCase, SkipMixin): verstr = str(allmydata.__version__) + self.failIfEqual(verstr, "unknown", + "We don't know our version, because this distribution didn't come " + "with a _version.py and 'setup.py darcsver' hasn't been run.") + # The Python "rational version numbering" convention # disallows "-r$REV" but allows ".post$REV" # instead. Eventually we'll probably move to that. When we @@ -101,10 +105,8 @@ class BinTahoe(common_util.SignalMixin, unittest.TestCase, SkipMixin): else: altverstr = verstr - ad = os.path.dirname(os.path.dirname(os.path.realpath(allmydata.__file__))) - - required_ver_and_path = "%s: %s (%s)" % (allmydata.__appname__, verstr, ad) - alt_required_ver_and_path = "%s: %s (%s)" % (allmydata.__appname__, altverstr, ad) + required_ver_and_path = "%s: %s (%s)" % (allmydata.__appname__, verstr, srcdir) + alt_required_ver_and_path = "%s: %s (%s)" % (allmydata.__appname__, altverstr, srcdir) self.failUnless(out.startswith(required_ver_and_path) or out.startswith(alt_required_ver_and_path), (out, err, rc_or_sig, required_ver_and_path)) d.addCallback(_cb)