scp3.sh regression test fails if scp not already installed

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



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}
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux