Mercurial > hg > hg-git
annotate tests/testutil @ 575:a7da97e69d56
tests: extract extension configuration into a testutil library
Thanks to Felipe Contreras for the patch which this was based on.
Even though the MQ extension was only used in a single test
(test-pull-after-strip.t), I included it in the testutil. It shouldn't hurt
anything to have it enabled and not used, and saves us from having to deal
with enabling extensions in individual tests at all.
Similarly, this changeset results in the graphlog extension being enabled
for all tests, even though there were some that didn't use it before. This is
even less significant in Mercurial 2.3+, since in those versions, graphlog is
part of core, and is available even when the extension is disabled.
author | David M. Carr <david@carrclan.us> |
---|---|
date | Tue, 30 Oct 2012 20:03:26 -0400 |
parents | |
children | c4849b2dab87 |
rev | line source |
---|---|
575
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
1 #!/bin/sh |
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
2 |
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
3 # This file holds logic that is used in many tests. |
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
4 # It can be called in a test like this: |
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
5 # $ . "$TESTDIR/testutil" |
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
6 |
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
7 # Activate extensions |
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
8 echo "[extensions]" >> $HGRCPATH |
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
9 echo "hggit=$(echo $(dirname $TESTDIR))/hggit" >> $HGRCPATH |
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
10 # Not needed in Mercurial 2.3+, as graphlog was integrated into core |
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
11 echo 'graphlog=' >> $HGRCPATH |
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
12 echo 'mq=' >> $HGRCPATH |