test: make version based test-extensions failure more explanatory
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 10 Mar 2015 11:01:10 -0700
changeset 24257 31e9f66863f3
parent 24256 e964edc3274e
child 24258 093e8a5e995f
test: make version based test-extensions failure more explanatory A buggy __version__ content (usually from setup.py's hg being unable to read the repo) can make this test fails in an obscure manner. We make the root of the failure more explicit.
tests/test-extension.t
--- a/tests/test-extension.t	Mon Mar 09 22:14:09 2015 +0100
+++ b/tests/test-extension.t	Tue Mar 10 11:01:10 2015 -0700
@@ -946,6 +946,9 @@
 Declare the version as supporting this hg version, show regular bts link:
   $ hgver=`$PYTHON -c 'from mercurial import util; print util.version().split("+")[0]'`
   $ echo 'testedwith = """'"$hgver"'"""' >> throw.py
+  $ if [ -z "$hgver" ]; then
+  >   echo "unable to fetch a mercurial version. Make sure __version__ is correct";
+  > fi
   $ rm -f throw.pyc throw.pyo
   $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
   ** unknown exception encountered, please report by visiting