Mercurial > evolve
changeset 829:0943f327e2fb
exchance: add a common setup script for all test
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 03 Mar 2014 13:12:50 -0800 |
parents | c362513b3c7e |
children | f3b3a09ba312 |
files | tests/_exc-util.sh tests/test-exchange-A1.t tests/test-exchange-A2.t |
diffstat | 3 files changed, 25 insertions(+), 46 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/_exc-util.sh Mon Mar 03 13:12:50 2014 -0800 @@ -0,0 +1,23 @@ +#!/bin/sh + +cat >> $HGRCPATH <<EOF +[web] +push_ssl = false +allow_push = * +[ui] +logtemplate ="{node|short} ({phase}): {desc}\n" +[phases] +publish=False +[extensions] +hgext.rebase= +EOF +echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH + +mkcommit() { + echo "$1" > "$1" + hg add "$1" + hg ci -m "$1" +} +getid() { + hg id --hidden --debug -ir "$1" +}
--- a/tests/test-exchange-A1.t Fri Feb 28 16:36:37 2014 -0800 +++ b/tests/test-exchange-A1.t Mon Mar 03 13:12:50 2014 -0800 @@ -1,27 +1,7 @@ Initial setup - $ cat >> $HGRCPATH <<EOF - > [web] - > push_ssl = false - > allow_push = * - > [ui] - > logtemplate ="{node|short} ({phase}): {desc}\n" - > [phases] - > publish=False - > [extensions] - > hgext.rebase= - > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH - - $ mkcommit() { - > echo "$1" > "$1" - > hg add "$1" - > hg ci -m "$1" - > } - $ getid() { - > hg id --hidden --debug -ir "$1" - > } + $ . $TESTDIR/_exc-util.sh ==== A.1.1 pushing a single head ==== ..
--- a/tests/test-exchange-A2.t Fri Feb 28 16:36:37 2014 -0800 +++ b/tests/test-exchange-A2.t Mon Mar 03 13:12:50 2014 -0800 @@ -2,31 +2,7 @@ Initial setup - $ cat >> $HGRCPATH <<EOF - > [web] - > push_ssl = false - > allow_push = * - > [ui] - > logtemplate ="{node|short} ({phase}): {desc}\n" - > [phases] - > publish=False - > [extensions] - > hgext.rebase= - > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH - - $ mkcommit() { - > echo "$1" > "$1" - > hg add "$1" - > hg ci -m "$1" - > } - $ getid() { - > hg id --hidden --debug -ir "$1" - > } - - - - + $ . $TESTDIR/_exc-util.sh === A.2 Two heads ===