# HG changeset patch # User Patrick Mezard # Date 1344009394 -7200 # Node ID 507e8f94b26a81e5ffaeda9ca6681455f54cc673 # Parent 29c100b42f5b64274342b094a35382e482885e4c 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. diff -r 29c100b42f5b -r 507e8f94b26a tests/test-convert-darcs.t --- 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