comparison 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
comparison
equal deleted inserted replaced
2045:db617700d318 2046:994d81caec68
1
2 $ . ${TESTDIR}/testlib/pythonpath.sh
1 3
2 $ cat >> $HGRCPATH <<EOF 4 $ cat >> $HGRCPATH <<EOF
3 > [defaults] 5 > [defaults]
4 > amend=-d "0 0" 6 > amend=-d "0 0"
5 > [web] 7 > [web]
18 > echo "$1" > "$1" 20 > echo "$1" > "$1"
19 > hg add "$1" 21 > hg add "$1"
20 > hg ci -m "add $1" 22 > hg ci -m "add $1"
21 > } 23 > }
22 24
25
26 $ hg init server
27
28 Try the multiple ways to setup the extension
29
30 $ hg -R server log --config 'extensions.evolve.serveronly='
31 $ hg -R server log --config "extensions.evolve.serveronly=${SRCDIR}/hgext3rd/evolve/serveronly.py"
32 $ PYTHONPATH=$HGTEST_ORIG_PYTHONPATH hg -R server log --config "extensions.evolve.serveronly=${SRCDIR}/hgext3rd/evolve/serveronly.py"
33
23 setup repo 34 setup repo
24 35
25 $ hg init server
26 $ echo "[extensions]" >> ./server/.hg/hgrc 36 $ echo "[extensions]" >> ./server/.hg/hgrc
27 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/serveronly.py" >> ./server/.hg/hgrc 37 $ echo "evolve.serveronly=" >> ./server/.hg/hgrc
28 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log 38 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log --traceback
29 $ cat hg.pid >> $DAEMON_PIDS 39 $ cat hg.pid >> $DAEMON_PIDS
30 40
31 $ hg clone http://localhost:$HGPORT/ client 41 $ hg clone http://localhost:$HGPORT/ client
32 no changes found 42 no changes found
33 updating to branch default 43 updating to branch default
34 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 44 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
35 $ cat ./errors.log 45 $ cat ./errors.log
36 $ echo "[extensions]" >> ./client/.hg/hgrc 46 $ echo "[extensions]" >> ./client/.hg/hgrc
37 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> ./client/.hg/hgrc 47 $ echo "evolve=" >> ./client/.hg/hgrc
38 $ cp -r client other 48 $ cp -r client other
39 49
40 Smoke testing 50 Smoke testing
41 =============== 51 ===============
42 52