add LTESTS_FROM variable to allow skipping of tests up to a specific
authordjm <djm@openbsd.org>
Wed, 17 May 2023 05:52:01 +0000 (05:52 +0000)
committerdjm <djm@openbsd.org>
Wed, 17 May 2023 05:52:01 +0000 (05:52 +0000)
point. e.g. "make LTESTS_FROM=t-sftp" will only run the sftp.sh test
and subsequent ones. ok dtucker@

regress/usr.bin/ssh/Makefile

index 8ae0d0d..006f79d 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile,v 1.124 2023/03/01 09:29:32 dtucker Exp $
+#      $OpenBSD: Makefile,v 1.125 2023/05/17 05:52:01 djm Exp $
 
 OPENSSL?=      yes
 
@@ -13,7 +13,7 @@ REGRESS_SETUP_ONCE=misc       # For sk-dummy.so
 REGRESS_FAIL_EARLY?=   yes
 
 # Key conversion operations are not supported when built w/out OpenSSL.
-.if ${OPENSSL:L} != no
+.if !defined(LTESTS_FROM) && ${OPENSSL:L} != no
 REGRESS_TARGETS=       t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12
 .endif
 
@@ -221,8 +221,14 @@ t-${t}: timestamp
            sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/${t}.sh
 .endfor
 
+.undef LTESTS_STARTED
 .for t in ${LTESTS}
+.if defined(LTESTS_FROM) && ${LTESTS_FROM} == t-${t}
+LTESTS_STARTED=yes
+.endif
+.if !defined(LTESTS_FROM) || defined(LTESTS_STARTED)
 REGRESS_TARGETS+=t-${t}
+.endif
 .endfor
 
 .for t in ${INTEROP_TESTS}