changeset 24257:31e9f66863f3

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 10 Mar 2015 11:01:10 -0700
parents e964edc3274e
children 093e8a5e995f
files tests/test-extension.t
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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