Skip to content
Snippets Groups Projects
Commit cd103ab2 authored by Raphaël Gomès's avatar Raphaël Gomès
Browse files

hg-benchmarks: don't hardcode localhost in ssh tests

Some setups don't allow localhost, use the hostname instead.
parent 56ca1726
No related branches found
No related tags found
No related merge requests found
Pipeline #100210 passed
......@@ -21,5 +21,5 @@
else if [ \"$PROTO\" = \"local-pull\" ]; then
echo \"--pull $MAIN_REPO\" > SOURCE
else if [ \"$PROTO\" = \"ssh-pull\" ]; then
echo \"--pull ssh://localhost/$PWD/$MAIN_REPO\" > SOURCE
echo \"--pull ssh://$(hostname)/$PWD/$MAIN_REPO\" > SOURCE
else if [ \"$PROTO\" = \"ssh-stream\" ]; then
......@@ -25,5 +25,5 @@
else if [ \"$PROTO\" = \"ssh-stream\" ]; then
echo \"--stream ssh://localhost/$PWD/$MAIN_REPO\" > SOURCE
echo \"--stream ssh://$(hostname)/$PWD/$MAIN_REPO\" > SOURCE
fi
fi
fi
......
......@@ -17,5 +17,5 @@
else if [ "$PROTO" = "local-pull" ]; then
echo "--pull $MAIN_REPO" > SOURCE
else if [ "$PROTO" = "ssh-pull" ]; then
echo "--pull ssh://localhost/$PWD/$MAIN_REPO" > SOURCE
echo "--pull ssh://$(hostname)/$PWD/$MAIN_REPO" > SOURCE
else if [ "$PROTO" = "ssh-stream" ]; then
......@@ -21,5 +21,5 @@
else if [ "$PROTO" = "ssh-stream" ]; then
echo "--stream ssh://localhost/$PWD/$MAIN_REPO" > SOURCE
echo "--stream ssh://$(hostname)/$PWD/$MAIN_REPO" > SOURCE
fi
fi
fi
......
......@@ -28,7 +28,7 @@
cp --archive --recursive --reflink=auto \"$MAIN_REPO\" temporary-pull-local;
echo '[paths]' >> temporary-pull-local/.hg/hgrc
if [ $PROTO == \"ssh\" ]; then
echo \"default=ssh://localhost/$PWD/temporary-pull-remote\" >> temporary-pull-local/.hg/hgrc
echo \"default=ssh://$(hostname)/$PWD/temporary-pull-remote\" >> temporary-pull-local/.hg/hgrc
else
echo \"default=../temporary-pull-remote\" >> temporary-pull-local/.hg/hgrc
fi"""
......
......@@ -24,7 +24,7 @@
cp --archive --recursive --reflink=auto "$MAIN_REPO" temporary-pull-local;
echo '[paths]' >> temporary-pull-local/.hg/hgrc
if [ $PROTO == "ssh" ]; then
echo "default=ssh://localhost/$PWD/temporary-pull-remote" >> temporary-pull-local/.hg/hgrc
echo "default=ssh://$(hostname)/$PWD/temporary-pull-remote" >> temporary-pull-local/.hg/hgrc
else
echo "default=../temporary-pull-remote" >> temporary-pull-local/.hg/hgrc
fi
......
......@@ -20,7 +20,7 @@
fi
echo '[paths]' >> temporary-push-local/.hg/hgrc
if [ $PROTO == \"ssh\" ]; then
echo \"default=ssh://localhost/$PWD/temporary-push-remote\" >> temporary-push-local/.hg/hgrc
echo \"default=ssh://$(hostname)/$PWD/temporary-push-remote\" >> temporary-push-local/.hg/hgrc
else
echo \"default=../temporary-push-remote\" >> temporary-push-local/.hg/hgrc
fi
......
......@@ -15,7 +15,7 @@
fi
echo '[paths]' >> temporary-push-local/.hg/hgrc
if [ $PROTO == "ssh" ]; then
echo "default=ssh://localhost/$PWD/temporary-push-remote" >> temporary-push-local/.hg/hgrc
echo "default=ssh://$(hostname)/$PWD/temporary-push-remote" >> temporary-push-local/.hg/hgrc
else
echo "default=../temporary-push-remote" >> temporary-push-local/.hg/hgrc
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment