t9020: use configured Python to run the test helper

The test helper svnrdump_sim.py is used as "svnrdump" during the execution of this test, but the arrangement was not optimal: - it relied on symbolic links; - unportable "export VAR=VAL" was used; - GIT_BUILD_DIR variable was not quoted correctly; - it assumed that the Python interpreter is in /usr/bin/ and called "python" (i.e. not "python2.7" etc.) Rework this by writing a small shell script that spawns the right Python interpreter, using the right quoting. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Dec 18, 2012 at 20:41 UTC 5a029666858d11e66eb689bba1c6435e8b9d0979
1 file changed +7 -3
t/t9020-remote-svn.sh
+7 -3
@@ -12,9 +12,13 @@ then
12 test_done
13 fi
14
15 -# We override svnrdump by placing a symlink to the svnrdump-emulator in .
16 -export PATH="$HOME:$PATH"
17 -ln -sf $GIT_BUILD_DIR/contrib/svn-fe/svnrdump_sim.py "$HOME/svnrdump"
15 +# Override svnrdump with our simulator
16 +PATH="$HOME:$PATH"
17 +export PATH PYTHON_PATH GIT_BUILD_DIR
18 +
19 +write_script "$HOME/svnrdump" <<\EOF
20 +exec "$PYTHON_PATH" "$GIT_BUILD_DIR/contrib/svn-fe/svnrdump_sim.py" "$@"
21 +EOF
22
23 init_git () {
24 rm -fr .git &&