From acd2060f750c16d48b87b92a10b5a833227baf9d Mon Sep 17 00:00:00 2001
From: Darren Tucker <dtucker@zip.com.au>
Date: Thu, 8 Aug 2013 17:02:12 +1000
Subject: [PATCH]  - (dtucker) [regress/Makefile regress/test-exec.sh] Roll
 back the -nt    removal.  The "make clean" removes modpipe which is built by
 the top-level    directory before running the tests.  Spotted by tim@

---
 ChangeLog            | 3 +++
 regress/Makefile     | 2 +-
 regress/test-exec.sh | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 40e1812dc..12429fd57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,9 @@
    by Kevin Brott, ok djm.
  - (dtucker) [misc.c] Remove define added for fallback testing that was
    mistakenly included in the previous commit.
+ - (dtucker) [regress/Makefile regress/test-exec.sh] Roll back the -nt
+   removal.  The "make clean" removes modpipe which is built by the top-level
+   directory before running the tests.  Spotted by tim@
 
 20130804
  - (dtucker) [auth-krb5.c configure.ac openbsd-compat/bsd-misc.h] Add support
diff --git a/regress/Makefile b/regress/Makefile
index 3d1b669e8..ab2a6ae7b 100644
--- a/regress/Makefile
+++ b/regress/Makefile
@@ -1,7 +1,7 @@
 #	$OpenBSD: Makefile,v 1.65 2013/04/18 02:46:12 djm Exp $
 
 REGRESS_TARGETS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t-exec
-tests:		clean $(REGRESS_TARGETS)
+tests:		$(REGRESS_TARGETS)
 
 # Interop tests are not run by default
 interop interop-tests: t-exec-interop
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 9e66f9269..eee446264 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -368,7 +368,7 @@ rm -f $OBJ/known_hosts $OBJ/authorized_keys_$USER
 trace "generate keys"
 for t in rsa rsa1; do
 	# generate user key
-	if [ ! -f $OBJ/$t ]; then
+	if [ ! -f $OBJ/$t ] || [ ${SSHKEYGEN} -nt $OBJ/$t ]; then
 		rm -f $OBJ/$t
 		${SSHKEYGEN} -q -N '' -t $t  -f $OBJ/$t ||\
 			fail "ssh-keygen for $t failed"