Mercurial > hg-stable
changeset 17448:507e8f94b26a
test-convert-darcs.t: fix elementtree test
On OSX, the test succeeds because darcs aborts when trying to convert
the dummy repository, and the test only grep for the output. On Windows,
the darcs call succeeds for some reason but darcs fails to emit any output,
which is not a valid XML output, which causes a traceback including the
ElementTree string matched by the check, and makes a false positive.
Check with a real repository instead. The darcs upgrade test is moved
at the end so we can use our handmade darcs repository for the test.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Fri, 03 Aug 2012 17:56:34 +0200 |
parents | 29c100b42f5b |
children | 3d1b64bc8150 |
files | tests/test-convert-darcs.t |
diffstat | 1 files changed, 17 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-convert-darcs.t Fri Aug 03 17:59:21 2012 +0200 +++ b/tests/test-convert-darcs.t Fri Aug 03 17:56:34 2012 +0200 @@ -5,25 +5,6 @@ $ echo 'graphlog =' >> $HGRCPATH $ DARCS_EMAIL='test@example.org'; export DARCS_EMAIL -skip if we can't import elementtree - - $ mkdir dummy - $ mkdir dummy/_darcs - $ if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then - > echo 'skipped: missing feature: elementtree module' - > exit 80 - > fi - -#if no-outer-repo - -try converting darcs1 repository - - $ hg clone -q "$TESTDIR/bundles/darcs1.hg" darcs - $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0 - darcs-1.0 repository format is unsupported, please upgrade - -#endif - initialize darcs repo $ mkdir darcs-repo @@ -44,6 +25,13 @@ Finished recording patch 'p1.1' $ cd .. +skip if we can't import elementtree + + $ if hg convert darcs-repo darcs-dummy 2>&1 | grep ElementTree > /dev/null; then + > echo 'skipped: missing feature: elementtree module' + > exit 80 + > fi + update source $ cd darcs-repo @@ -108,3 +96,13 @@ 1e88685f5ddec574a34c70af492f95b6debc8741 644 b 37406831adc447ec2385014019599dfec953c806 644 dir2/d b783a337463792a5c7d548ad85a7d3253c16ba8c 644 ff + +#if no-outer-repo + +try converting darcs1 repository + + $ hg clone -q "$TESTDIR/bundles/darcs1.hg" darcs + $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0 + darcs-1.0 repository format is unsupported, please upgrade + +#endif