1 # $OpenBSD: Makefile,v 1.58 2011/01/06 22:46:21 djm Exp $
3 REGRESS_TARGETS
= t1 t2 t3 t4 t5 t6 t7 t8 t9 t-exec
4 tests
: $(REGRESS_TARGETS
)
6 # Interop tests are not run by default
7 interop interop-tests
: t-exec-interop
10 for F in
$(CLEANFILES
); do
rm -f
$(OBJ
)$$F; done
62 INTEROP_TESTS
= putty-transfer putty-ciphers putty-kex conch-ciphers
63 #INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
68 CLEANFILES
= t2.out t3.out t6.out1 t6.out2 t7.out t7.out.pub copy
.1 copy
.2 \
69 t8.out t8.out.pub t9.out t9.out.pub \
70 authorized_keys_
${USER} known_hosts pidfile \
71 ssh_config sshd_config.orig ssh_proxy sshd_config sshd_proxy \
72 rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \
73 rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \
74 ls.copy banner.in banner.out empty.in \
75 scp-ssh-wrapper.scp ssh_proxy_envpass remote_pid \
76 sshd_proxy_bak rsa_ssh2_cr.prv rsa_ssh2_crnl.prv \
77 known_hosts-cert host_ca_key
* cert_host_key
* \
78 putty.rsa2 sshd_proxy_orig ssh_proxy_bak \
79 key.rsa-
* key.dsa-
* key.ecdsa-
* \
80 authorized_principals_
${USER} expect actual
82 # Enable all malloc(3) randomisations and checks
83 TEST_ENV
= "MALLOC_OPTIONS=AFGJPRX"
85 TEST_SSH_SSHKEYGEN?
=ssh-keygen
88 ${TEST_SSH_SSHKEYGEN} -if
${.CURDIR
}/rsa_ssh2.prv | diff
- ${.CURDIR
}/rsa_openssh.prv
89 tr
'\n' '\r' <${.CURDIR
}/rsa_ssh2.prv
> ${.OBJDIR
}/rsa_ssh2_cr.prv
90 ${TEST_SSH_SSHKEYGEN} -if
${.OBJDIR
}/rsa_ssh2_cr.prv | diff
- ${.CURDIR
}/rsa_openssh.prv
91 awk
'{print $$0 "\r"}' ${.CURDIR
}/rsa_ssh2.prv
> ${.OBJDIR
}/rsa_ssh2_crnl.prv
92 ${TEST_SSH_SSHKEYGEN} -if
${.OBJDIR
}/rsa_ssh2_crnl.prv | diff
- ${.CURDIR
}/rsa_openssh.prv
95 cat
${.CURDIR
}/rsa_openssh.prv
> $(OBJ
)/t2.out
96 chmod
600 $(OBJ
)/t2.out
97 ${TEST_SSH_SSHKEYGEN} -yf
$(OBJ
)/t2.out | diff
- ${.CURDIR
}/rsa_openssh.pub
100 ${TEST_SSH_SSHKEYGEN} -ef
${.CURDIR
}/rsa_openssh.pub
>$(OBJ
)/t3.out
101 ${TEST_SSH_SSHKEYGEN} -if
$(OBJ
)/t3.out | diff
- ${.CURDIR
}/rsa_openssh.pub
104 ${TEST_SSH_SSHKEYGEN} -lf
${.CURDIR
}/rsa_openssh.pub |\
105 awk
'{print $$2}' | diff
- ${.CURDIR
}/t4.ok
108 ${TEST_SSH_SSHKEYGEN} -Bf
${.CURDIR
}/rsa_openssh.pub |\
109 awk
'{print $$2}' | diff
- ${.CURDIR
}/t5.ok
112 ${TEST_SSH_SSHKEYGEN} -if
${.CURDIR
}/dsa_ssh2.prv
> $(OBJ
)/t6.out1
113 ${TEST_SSH_SSHKEYGEN} -if
${.CURDIR
}/dsa_ssh2.pub
> $(OBJ
)/t6.out2
114 chmod
600 $(OBJ
)/t6.out1
115 ${TEST_SSH_SSHKEYGEN} -yf
$(OBJ
)/t6.out1 | diff
- $(OBJ
)/t6.out2
118 ${TEST_SSH_SSHKEYGEN} -q
-t rsa
-N
'' -f
$@
121 ${TEST_SSH_SSHKEYGEN} -lf
$(OBJ
)/t7.out
> /dev
/null
122 ${TEST_SSH_SSHKEYGEN} -Bf
$(OBJ
)/t7.out
> /dev
/null
125 ${TEST_SSH_SSHKEYGEN} -q
-t dsa
-N
'' -f
$@
128 ${TEST_SSH_SSHKEYGEN} -lf
$(OBJ
)/t8.out
> /dev
/null
129 ${TEST_SSH_SSHKEYGEN} -Bf
$(OBJ
)/t8.out
> /dev
/null
132 test "${TEST_SSH_ECC}" != yes || \
133 ${TEST_SSH_SSHKEYGEN} -q
-t ecdsa
-N
'' -f
$@
136 test "${TEST_SSH_ECC}" != yes || \
137 ${TEST_SSH_SSHKEYGEN} -lf
$(OBJ
)/t9.out
> /dev
/null
138 test "${TEST_SSH_ECC}" != yes || \
139 ${TEST_SSH_SSHKEYGEN} -Bf
$(OBJ
)/t9.out
> /dev
/null
141 t-exec
: ${LTESTS
:=.sh
}
142 @if
[ "x$?" = "x" ]; then exit
0; fi
; \
143 for TEST in
""$?
; do \
144 echo
"run test $${TEST}" ...
1>&2; \
145 (env SUDO
="${SUDO}" TEST_ENV
=${TEST_ENV} sh
${.CURDIR
}/test-exec.sh
${.OBJDIR
} ${.CURDIR
}/$${TEST}) || exit
$$?
; \
148 t-exec-interop
: ${INTEROP_TESTS
:=.sh
}
149 @if
[ "x$?" = "x" ]; then exit
0; fi
; \
150 for TEST in
""$?
; do \
151 echo
"run test $${TEST}" ...
1>&2; \
152 (env SUDO
="${SUDO}" TEST_ENV
=${TEST_ENV} sh
${.CURDIR
}/test-exec.sh
${.OBJDIR
} ${.CURDIR
}/$${TEST}) || exit
$$?
; \
156 interop
: ${INTEROP_TARGETS}