Skip to content

Commit 5a02966

Browse files
committed
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 <[email protected]>
1 parent 2d3ac9a commit 5a02966

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

t/t9020-remote-svn.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ then
1212
test_done
1313
fi
1414

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
1822

1923
init_git () {
2024
rm -fr .git &&

0 commit comments

Comments
 (0)