comparison tests/test-simple4server-bundle2.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 202ac6c94b7f
children cbdb68189432
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]
15 > echo "$1" > "$1" 17 > echo "$1" > "$1"
16 > hg add "$1" 18 > hg add "$1"
17 > hg ci -m "add $1" 19 > hg ci -m "add $1"
18 > } 20 > }
19 21
22 $ hg init server
23
24 Try the multiple ways to setup the extension
25
26 $ hg -R server log --config 'extensions.evolve.serveronly='
27 $ hg -R server log --config "extensions.evolve.serveronly=${SRCDIR}/hgext3rd/evolve/serveronly.py"
28 $ PYTHONPATH=$HGTEST_ORIG_PYTHONPATH hg -R server log --config "extensions.evolve.serveronly=${SRCDIR}/hgext3rd/evolve/serveronly.py"
29
20 setup repo 30 setup repo
21 31
22 $ hg init server
23 $ echo "[extensions]" >> ./server/.hg/hgrc 32 $ echo "[extensions]" >> ./server/.hg/hgrc
24 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/serveronly.py" >> ./server/.hg/hgrc 33 $ echo "evolve.serveronly=" >> ./server/.hg/hgrc
25 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log 34 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
26 $ cat hg.pid >> $DAEMON_PIDS 35 $ cat hg.pid >> $DAEMON_PIDS
27 36
28 $ hg clone http://localhost:$HGPORT/ client 37 $ hg clone http://localhost:$HGPORT/ client
29 no changes found 38 no changes found
30 updating to branch default 39 updating to branch default
31 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 40 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 $ cat ./errors.log 41 $ cat ./errors.log
33 $ echo "[extensions]" >> ./client/.hg/hgrc 42 $ echo "[extensions]" >> ./client/.hg/hgrc
34 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> ./client/.hg/hgrc 43 $ echo "evolve=" >> ./client/.hg/hgrc
35 $ cp -r client other 44 $ cp -r client other
36 45
37 Smoke testing 46 Smoke testing
38 =============== 47 ===============
39 48