Mercurial > evolve
diff tests/test-simple4server.t @ 2046:994d81caec68
test: update test to check for various way to import the serveronly things
We add a "setup script" that update the PYTHONPATH to allow direct import of
the extension code. Then we tests that all way to import the extensions works.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 07 Mar 2017 12:10:05 +0100 |
parents | 6942750831bb |
children | 4c195eb4d2c5 |
line wrap: on
line diff
--- a/tests/test-simple4server.t Tue Mar 07 12:04:05 2017 +0100 +++ b/tests/test-simple4server.t Tue Mar 07 12:10:05 2017 +0100 @@ -1,3 +1,5 @@ + + $ . ${TESTDIR}/testlib/pythonpath.sh $ cat >> $HGRCPATH <<EOF > [defaults] @@ -20,12 +22,20 @@ > hg ci -m "add $1" > } -setup repo $ hg init server + +Try the multiple ways to setup the extension + + $ hg -R server log --config 'extensions.evolve.serveronly=' + $ hg -R server log --config "extensions.evolve.serveronly=${SRCDIR}/hgext3rd/evolve/serveronly.py" + $ PYTHONPATH=$HGTEST_ORIG_PYTHONPATH hg -R server log --config "extensions.evolve.serveronly=${SRCDIR}/hgext3rd/evolve/serveronly.py" + +setup repo + $ echo "[extensions]" >> ./server/.hg/hgrc - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/serveronly.py" >> ./server/.hg/hgrc - $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log + $ echo "evolve.serveronly=" >> ./server/.hg/hgrc + $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log --traceback $ cat hg.pid >> $DAEMON_PIDS $ hg clone http://localhost:$HGPORT/ client @@ -34,7 +44,7 @@ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat ./errors.log $ echo "[extensions]" >> ./client/.hg/hgrc - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> ./client/.hg/hgrc + $ echo "evolve=" >> ./client/.hg/hgrc $ cp -r client other Smoke testing