scp3.sh regression test fails if scp not already installed
rapier
rapier at psc.edu
Sat Jul 23 05:31:09 AEST 2022
Hey all,
I know this is a corner case but it turns out that the scp3.sh
regression test fails if you don't already have scp installed in your
path. I know a lot of people won't run into that but it's sort of a
chicken or egg problem.
The following patch checks to see if it's in the path or if it's only in
the openssh-portable build directory. I have a strong suspicion that
this test will fail in debuild or rpmbuild environments but it will fail
in a way that the test is run.
Chris
diff --git a/regress/scp3.sh b/regress/scp3.sh
index f71b15677..7555e4e4d 100644
--- a/regress/scp3.sh
+++ b/regress/scp3.sh
@@ -14,6 +14,15 @@ cp ${SRC}/scp-ssh-wrapper.sh ${OBJ}/scp-ssh-wrapper.scp
chmod 755 ${OBJ}/scp-ssh-wrapper.scp
export SCP # used in scp-ssh-wrapper.scp
+
+scp_path=$(which -a scp)
+if [ -x "$scp_path" ] || [ $scp_path == "*openssh-portable*" ]; then
+ echo "*****************"
+ echo "scp not found in path. Skipping scp3 test."
+ echo "*****************"
+ exit
+fi
+
scpclean() {
rm -rf ${COPY} ${COPY2} ${DIR} ${DIR2}
mkdir ${DIR} ${DIR2}
More information about the openssh-unix-dev
mailing list