Damien Miller | 58ac6de | 2010-02-27 07:57:12 +1100 | [diff] [blame^] | 1 | # $OpenBSD: Makefile,v 1.52 2010/02/26 20:33:21 djm Exp $ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 2 | |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 3 | REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec |
| 4 | tests: $(REGRESS_TARGETS) |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 5 | |
Damien Miller | af78493 | 2008-03-13 00:17:00 +1100 | [diff] [blame] | 6 | # Interop tests are not run by default |
Damien Miller | 6642996 | 2008-03-13 12:05:40 +1100 | [diff] [blame] | 7 | interop interop-tests: t-exec-interop |
Damien Miller | af78493 | 2008-03-13 00:17:00 +1100 | [diff] [blame] | 8 | |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 9 | clean: |
Darren Tucker | b12d16f | 2003-09-14 11:40:35 +1000 | [diff] [blame] | 10 | for F in $(CLEANFILES); do rm -f $(OBJ)$$F; done |
Damien Miller | 9c8a427 | 2008-03-27 17:42:06 +1100 | [diff] [blame] | 11 | rm -rf $(OBJ).putty |
| 12 | |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 13 | distclean: clean |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 14 | |
| 15 | LTESTS= connect \ |
| 16 | proxy-connect \ |
| 17 | connect-privsep \ |
| 18 | proto-version \ |
| 19 | proto-mismatch \ |
| 20 | exit-status \ |
Darren Tucker | 4c37ef0 | 2004-06-16 20:08:56 +1000 | [diff] [blame] | 21 | envpass \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 22 | transfer \ |
Darren Tucker | dc001a5 | 2003-10-08 17:47:19 +1000 | [diff] [blame] | 23 | banner \ |
Darren Tucker | d57a76e | 2003-06-18 22:32:51 +1000 | [diff] [blame] | 24 | rekey \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 25 | stderr-data \ |
| 26 | stderr-after-eof \ |
| 27 | broken-pipe \ |
| 28 | try-ciphers \ |
| 29 | yes-head \ |
Darren Tucker | 017fd61 | 2004-02-29 20:30:17 +1100 | [diff] [blame] | 30 | login-timeout \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 31 | agent \ |
Damien Miller | 8b9cde7 | 2003-01-22 17:53:16 +1100 | [diff] [blame] | 32 | agent-getpeereid \ |
| 33 | agent-timeout \ |
| 34 | agent-ptrace \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 35 | keyscan \ |
Damien Miller | 8b9cde7 | 2003-01-22 17:53:16 +1100 | [diff] [blame] | 36 | keygen-change \ |
Damien Miller | b6bd3c2 | 2010-02-24 17:24:56 +1100 | [diff] [blame] | 37 | keygen-convert \ |
Damien Miller | 2e80cf2 | 2008-06-30 08:06:25 +1000 | [diff] [blame] | 38 | key-options \ |
Darren Tucker | 50433a9 | 2004-06-16 20:15:59 +1000 | [diff] [blame] | 39 | scp \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 40 | sftp \ |
Damien Miller | 8b9cde7 | 2003-01-22 17:53:16 +1100 | [diff] [blame] | 41 | sftp-cmds \ |
Darren Tucker | a4040f5 | 2003-06-18 22:35:11 +1000 | [diff] [blame] | 42 | sftp-badcmds \ |
Damien Miller | 8b9cde7 | 2003-01-22 17:53:16 +1100 | [diff] [blame] | 43 | sftp-batch \ |
Darren Tucker | 1c56ef6 | 2005-03-07 17:36:18 +1100 | [diff] [blame] | 44 | sftp-glob \ |
Darren Tucker | 50cea67 | 2003-06-18 22:45:34 +1000 | [diff] [blame] | 45 | reconfigure \ |
Darren Tucker | e2f2be7 | 2003-07-03 20:27:55 +1000 | [diff] [blame] | 46 | dynamic-forward \ |
Darren Tucker | e7d0583 | 2004-06-16 20:22:22 +1000 | [diff] [blame] | 47 | forwarding \ |
Darren Tucker | 977a9d2 | 2004-06-25 13:45:18 +1000 | [diff] [blame] | 48 | multiplex \ |
Darren Tucker | 124f58e | 2004-12-06 23:07:37 +1100 | [diff] [blame] | 49 | reexec \ |
Damien Miller | 7b1877c | 2006-07-24 15:31:41 +1000 | [diff] [blame] | 50 | brokenkeys \ |
| 51 | cfgmatch \ |
Darren Tucker | 10f9242 | 2008-06-10 23:16:46 +1000 | [diff] [blame] | 52 | addrmatch \ |
Damien Miller | a5e5842 | 2008-03-12 23:58:05 +1100 | [diff] [blame] | 53 | localcommand \ |
Darren Tucker | 287b932 | 2009-10-07 10:31:56 +1100 | [diff] [blame] | 54 | forcecommand \ |
Damien Miller | 58ac6de | 2010-02-27 07:57:12 +1100 | [diff] [blame^] | 55 | portnum \ |
| 56 | cert-hostkey \ |
| 57 | cert-userkey |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 58 | |
Damien Miller | 4268a13 | 2008-06-30 08:07:56 +1000 | [diff] [blame] | 59 | INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers |
Damien Miller | af78493 | 2008-03-13 00:17:00 +1100 | [diff] [blame] | 60 | #INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp |
| 61 | |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 62 | USER!= id -un |
Darren Tucker | 7b6cb5c | 2003-09-14 13:16:55 +1000 | [diff] [blame] | 63 | CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ |
| 64 | authorized_keys_${USER} known_hosts pidfile \ |
Darren Tucker | 3206e57 | 2004-12-06 23:04:57 +1100 | [diff] [blame] | 65 | ssh_config sshd_config.orig ssh_proxy sshd_config sshd_proxy \ |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 66 | rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \ |
| 67 | rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \ |
Darren Tucker | 50433a9 | 2004-06-16 20:15:59 +1000 | [diff] [blame] | 68 | ls.copy banner.in banner.out empty.in \ |
Damien Miller | 7b1877c | 2006-07-24 15:31:41 +1000 | [diff] [blame] | 69 | scp-ssh-wrapper.scp ssh_proxy_envpass remote_pid \ |
Damien Miller | 9c8a427 | 2008-03-27 17:42:06 +1100 | [diff] [blame] | 70 | sshd_proxy_bak rsa_ssh2_cr.prv rsa_ssh2_crnl.prv \ |
Damien Miller | 58ac6de | 2010-02-27 07:57:12 +1100 | [diff] [blame^] | 71 | known_hosts-cert host_ca_key* cert_host_key* \ |
Damien Miller | 9c8a427 | 2008-03-27 17:42:06 +1100 | [diff] [blame] | 72 | putty.rsa2 |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 73 | |
Damien Miller | 8f9492c | 2010-02-24 17:28:45 +1100 | [diff] [blame] | 74 | # Enable all malloc(3) randomisations and checks |
| 75 | TEST_ENV= "MALLOC_OPTIONS=AFGJPRX" |
| 76 | |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 77 | t1: |
| 78 | ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv |
| 79 | |
| 80 | t2: |
Tim Rice | 8b2157d | 2003-09-09 06:07:10 -0700 | [diff] [blame] | 81 | cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out |
| 82 | chmod 600 $(OBJ)/t2.out |
| 83 | ssh-keygen -yf $(OBJ)/t2.out | diff - ${.CURDIR}/rsa_openssh.pub |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 84 | |
| 85 | t3: |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 86 | ssh-keygen -ef ${.CURDIR}/rsa_openssh.pub >$(OBJ)/rsa_secsh.pub |
| 87 | ssh-keygen -if $(OBJ)/rsa_secsh.pub | diff - ${.CURDIR}/rsa_openssh.pub |
| 88 | rm -f ${.CURDIR}/rsa_secsh.pub |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 89 | |
| 90 | t4: |
| 91 | ssh-keygen -lf ${.CURDIR}/rsa_openssh.pub |\ |
| 92 | awk '{print $$2}' | diff - ${.CURDIR}/t4.ok |
| 93 | |
| 94 | t5: |
| 95 | ssh-keygen -Bf ${.CURDIR}/rsa_openssh.pub |\ |
| 96 | awk '{print $$2}' | diff - ${.CURDIR}/t5.ok |
| 97 | |
| 98 | t6: |
Tim Rice | 8b2157d | 2003-09-09 06:07:10 -0700 | [diff] [blame] | 99 | ssh-keygen -if ${.CURDIR}/dsa_ssh2.prv > $(OBJ)/t6.out1 |
| 100 | ssh-keygen -if ${.CURDIR}/dsa_ssh2.pub > $(OBJ)/t6.out2 |
| 101 | chmod 600 $(OBJ)/t6.out1 |
| 102 | ssh-keygen -yf $(OBJ)/t6.out1 | diff - $(OBJ)/t6.out2 |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 103 | |
Tim Rice | 8b2157d | 2003-09-09 06:07:10 -0700 | [diff] [blame] | 104 | $(OBJ)/t7.out: |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 105 | ssh-keygen -q -t rsa -N '' -f $@ |
| 106 | |
Tim Rice | 8b2157d | 2003-09-09 06:07:10 -0700 | [diff] [blame] | 107 | t7: $(OBJ)/t7.out |
| 108 | ssh-keygen -lf $(OBJ)/t7.out > /dev/null |
| 109 | ssh-keygen -Bf $(OBJ)/t7.out > /dev/null |
Damien Miller | 38cd435 | 2002-05-01 13:17:33 +1000 | [diff] [blame] | 110 | |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 111 | t-exec: ${LTESTS:=.sh} |
| 112 | @if [ "x$?" = "x" ]; then exit 0; fi; \ |
| 113 | for TEST in ""$?; do \ |
| 114 | echo "run test $${TEST}" ... 1>&2; \ |
Damien Miller | 8f9492c | 2010-02-24 17:28:45 +1100 | [diff] [blame] | 115 | (env SUDO=${SUDO} TEST_ENV=${TEST_ENV} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \ |
Darren Tucker | ebc3c13 | 2003-09-04 15:37:58 +1000 | [diff] [blame] | 116 | done |
Damien Miller | af78493 | 2008-03-13 00:17:00 +1100 | [diff] [blame] | 117 | |
| 118 | t-exec-interop: ${INTEROP_TESTS:=.sh} |
| 119 | @if [ "x$?" = "x" ]; then exit 0; fi; \ |
| 120 | for TEST in ""$?; do \ |
| 121 | echo "run test $${TEST}" ... 1>&2; \ |
Damien Miller | 8f9492c | 2010-02-24 17:28:45 +1100 | [diff] [blame] | 122 | (env SUDO=${SUDO} TEST_ENV=${TEST_ENV} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \ |
Damien Miller | af78493 | 2008-03-13 00:17:00 +1100 | [diff] [blame] | 123 | done |
| 124 | |