[PATCH stable] tests: don't run test-gpg if not in a working directory
Javi Merino
cibervicho at gmail.com
Mon Apr 2 16:38:38 CDT 2012
# HG changeset patch
# User Javi Merino <cibervicho at gmail.com>
# Date 1333401955 -3600
# Branch stable
# Node ID 1ee65497dce0c05647346ed3772e369db30c6abe
# Parent 6e738a0a3393ccf29086bfb6064decf647467a81
tests: don't run test-gpg if not in a working directory
test-gpg has to be run in a mercurial working directory as it uses
that to verify that it hasn't modified the trustdb.gpg file. Skip the
test if it is running in an exploded tarball.
diff --git a/tests/test-gpg.t b/tests/test-gpg.t
--- a/tests/test-gpg.t
+++ b/tests/test-gpg.t
@@ -1,6 +1,10 @@
Test the GPG extension
$ "$TESTDIR/hghave" gpg || exit 80
+ $ if ! hg identify -q > /dev/null; then
+ > echo "skipped: not a Mercurial working dir" >&2
+ > exit 80
+ > fi
$ cat <<EOF >> $HGRCPATH
> [extensions]
> gpg=
More information about the Mercurial-devel
mailing list