Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make/unit-tests tests/make: rename files that are no...



details:   https://anonhg.NetBSD.org/src/rev/e3a85c15f8d6
branches:  trunk
changeset: 373129:e3a85c15f8d6
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Jan 19 23:26:14 2023 +0000

description:
tests/make: rename files that are not test cases

diffstat:

 distrib/sets/lists/tests/mi                |   8 +++-
 tests/usr.bin/make/Makefile                |   4 +-
 tests/usr.bin/make/t_make.sh               |   9 +----
 usr.bin/make/unit-tests/Makefile           |   6 +---
 usr.bin/make/unit-tests/include-main.exp   |  16 ++++----
 usr.bin/make/unit-tests/include-main.mk    |   4 +-
 usr.bin/make/unit-tests/include-sub.inc    |  49 ++++++++++++++++++++++++++++++
 usr.bin/make/unit-tests/include-sub.mk     |  49 ------------------------------
 usr.bin/make/unit-tests/include-subsub.inc |   9 +++++
 usr.bin/make/unit-tests/include-subsub.mk  |   9 -----
 10 files changed, 78 insertions(+), 85 deletions(-)

diffs (263 lines):

diff -r f2a3ff1a2afa -r e3a85c15f8d6 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Thu Jan 19 22:48:42 2023 +0000
+++ b/distrib/sets/lists/tests/mi       Thu Jan 19 23:26:14 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1243 2023/01/16 00:23:55 rillig Exp $
+# $NetBSD: mi,v 1.1244 2023/01/19 23:26:14 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -5758,8 +5758,10 @@
 ./usr/tests/usr.bin/make/unit-tests/impsrc.mk                                  tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/include-main.exp                           tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/include-main.mk                            tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/make/unit-tests/include-sub.mk                             tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/make/unit-tests/include-subsub.mk                          tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/include-sub.inc                            tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/include-sub.mk                             tests-obsolete          obsolete
+./usr/tests/usr.bin/make/unit-tests/include-subsub.inc                         tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/include-subsub.mk                          tests-obsolete          obsolete
 ./usr/tests/usr.bin/make/unit-tests/job-flags.exp                              tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/job-flags.mk                               tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/job-output-long-lines.exp                  tests-usr.bin-tests     compattestfile,atf
diff -r f2a3ff1a2afa -r e3a85c15f8d6 tests/usr.bin/make/Makefile
--- a/tests/usr.bin/make/Makefile       Thu Jan 19 22:48:42 2023 +0000
+++ b/tests/usr.bin/make/Makefile       Thu Jan 19 23:26:14 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2021/04/17 11:21:17 rillig Exp $
+# $NetBSD: Makefile,v 1.4 2023/01/19 23:26:15 rillig Exp $
 
 # The tests for make(1) are maintained in src/usr.bin/make/unit-tests
 # (UNIT_TESTS_DISTDIR).  We copy them verbatim to ${FILESDIR}/unit-tests
@@ -25,7 +25,7 @@
 UNIT_TESTS_DISTDIR=    ${NETBSDSRCDIR}/usr.bin/make/unit-tests
 
 # Which original files to copy
-DISTFILES!=    (cd ${UNIT_TESTS_DISTDIR} && echo Makefile *.mk *.exp)
+DISTFILES!=    (cd ${UNIT_TESTS_DISTDIR} && echo Makefile *.mk *.inc *.exp)
 
 # Instruct bsd.files.mk to make the copies
 .for f in ${DISTFILES:S,^,${UNIT_TESTS_DISTDIR}/,}
diff -r f2a3ff1a2afa -r e3a85c15f8d6 tests/usr.bin/make/t_make.sh
--- a/tests/usr.bin/make/t_make.sh      Thu Jan 19 22:48:42 2023 +0000
+++ b/tests/usr.bin/make/t_make.sh      Thu Jan 19 23:26:14 2023 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: t_make.sh,v 1.15 2021/04/17 11:36:34 rillig Exp $
+# $NetBSD: t_make.sh,v 1.16 2023/01/19 23:26:15 rillig Exp $
 #
-# Copyright (c) 2008, 2010, 2014 The NetBSD Foundation, Inc.
+# Copyright (c) 2008, 2010, 2014, 2023 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -71,11 +71,6 @@
                basename="${filename##*/}"
                basename="${basename%.mk}"
 
-               # skip files that are not test cases on their own
-               case "${basename}" in
-               include-sub*) continue;;
-               esac
-
                atfname=${basename}
                while :; do
                        case "${atfname}" in
diff -r f2a3ff1a2afa -r e3a85c15f8d6 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Thu Jan 19 22:48:42 2023 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Thu Jan 19 23:26:14 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.328 2023/01/19 19:55:27 rillig Exp $
+# $NetBSD: Makefile,v 1.329 2023/01/19 23:26:14 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -26,10 +26,6 @@
 # Any added files must also be added to src/distrib/sets/lists/tests/mi.
 # To do that, just run "make sync-mi" in this directory.
 #
-# A few *.mk files are helper files for other tests (such as include-sub.mk)
-# and are thus not added to TESTS.  Such files must be ignored in
-# src/tests/usr.bin/make/t_make.sh.
-#
 
 .MAIN: all
 
diff -r f2a3ff1a2afa -r e3a85c15f8d6 usr.bin/make/unit-tests/include-main.exp
--- a/usr.bin/make/unit-tests/include-main.exp  Thu Jan 19 22:48:42 2023 +0000
+++ b/usr.bin/make/unit-tests/include-main.exp  Thu Jan 19 23:26:14 2023 +0000
@@ -1,17 +1,17 @@
 make: "include-main.mk" line 14: main-before-ok
 make: "include-main.mk" line 21: main-before-for-ok
-make: "include-sub.mk" line 4: sub-before-ok
-make: "include-sub.mk" line 14: sub-before-for-ok
+make: "include-sub.inc" line 4: sub-before-ok
+make: "include-sub.inc" line 14: sub-before-for-ok
 Parsing line 5: .  info subsub-ok
-make: "include-subsub.mk" line 5: subsub-ok
-       in .for loop from include-sub.mk:31 with i = include
-       in .for loop from include-sub.mk:30 with i = nested
-       in .for loop from include-sub.mk:29 with i = deeply
+make: "include-subsub.inc" line 5: subsub-ok
+       in .for loop from include-sub.inc:31 with i = include
+       in .for loop from include-sub.inc:30 with i = nested
+       in .for loop from include-sub.inc:29 with i = deeply
        in include-main.mk:27
 Parsing line 6: .MAKEFLAGS: -d0
 ParseDependency(.MAKEFLAGS: -d0)
-make: "include-sub.mk" line 38: sub-after-ok
-make: "include-sub.mk" line 45: sub-after-for-ok
+make: "include-sub.inc" line 38: sub-after-ok
+make: "include-sub.inc" line 45: sub-after-for-ok
 make: "include-main.mk" line 30: main-after-ok
 make: "include-main.mk" line 37: main-after-for-ok
 exit status 0
diff -r f2a3ff1a2afa -r e3a85c15f8d6 usr.bin/make/unit-tests/include-main.mk
--- a/usr.bin/make/unit-tests/include-main.mk   Thu Jan 19 22:48:42 2023 +0000
+++ b/usr.bin/make/unit-tests/include-main.mk   Thu Jan 19 23:26:14 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: include-main.mk,v 1.7 2022/01/08 23:41:43 rillig Exp $
+# $NetBSD: include-main.mk,v 1.8 2023/01/19 23:26:14 rillig Exp $
 #
 # Until 2020-09-05, the .INCLUDEDFROMFILE magic variable did not behave
 # as described in the manual page.
@@ -24,7 +24,7 @@
 .  endif
 .endfor
 
-.include "include-sub.mk"
+.include "include-sub.inc"
 
 .if !defined(.INCLUDEDFROMFILE)
 .  info main-after-ok
diff -r f2a3ff1a2afa -r e3a85c15f8d6 usr.bin/make/unit-tests/include-sub.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/include-sub.inc   Thu Jan 19 23:26:14 2023 +0000
@@ -0,0 +1,49 @@
+# $NetBSD: include-sub.inc,v 1.1 2023/01/19 23:26:14 rillig Exp $
+
+.if ${.INCLUDEDFROMFILE} == "include-main.mk"
+.  info sub-before-ok
+.else
+.  warning sub-before-fail(${.INCLUDEDFROMFILE})
+.endif
+
+# As of 2020-09-05, the .for loop is implemented as "including a file"
+# with a custom buffer.  Therefore this loop has side effects on these
+# variables.
+.for i in once
+.  if ${.INCLUDEDFROMFILE} == "include-main.mk"
+.    info sub-before-for-ok
+.  else
+.    warning sub-before-for-fail(${.INCLUDEDFROMFILE})
+.  endif
+.endfor
+
+# To see the variable 'includes' in action:
+#
+# Breakpoints:
+#      Parse_PushInput         at "Vector_Push(&includes)"
+#      HandleMessage           at entry
+# Watches:
+#      ((const IncludedFile *[10])(*includes.items))
+#      *CurFile()
+
+.for i in deeply
+.  for i in nested
+.    for i in include
+.include "include-subsub.inc"
+.    endfor
+.  endfor
+.endfor
+
+.if ${.INCLUDEDFROMFILE} == "include-main.mk"
+.  info sub-after-ok
+.else
+.  warning sub-after-fail(${.INCLUDEDFROMFILE})
+.endif
+
+.for i in once
+.  if ${.INCLUDEDFROMFILE} == "include-main.mk"
+.    info sub-after-for-ok
+.  else
+.    warning sub-after-for-fail(${.INCLUDEDFROMFILE})
+.  endif
+.endfor
diff -r f2a3ff1a2afa -r e3a85c15f8d6 usr.bin/make/unit-tests/include-sub.mk
--- a/usr.bin/make/unit-tests/include-sub.mk    Thu Jan 19 22:48:42 2023 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-# $NetBSD: include-sub.mk,v 1.9 2022/01/08 23:41:43 rillig Exp $
-
-.if ${.INCLUDEDFROMFILE} == "include-main.mk"
-.  info sub-before-ok
-.else
-.  warning sub-before-fail(${.INCLUDEDFROMFILE})
-.endif
-
-# As of 2020-09-05, the .for loop is implemented as "including a file"
-# with a custom buffer.  Therefore this loop has side effects on these
-# variables.
-.for i in once
-.  if ${.INCLUDEDFROMFILE} == "include-main.mk"
-.    info sub-before-for-ok
-.  else
-.    warning sub-before-for-fail(${.INCLUDEDFROMFILE})
-.  endif
-.endfor
-
-# To see the variable 'includes' in action:
-#
-# Breakpoints:
-#      Parse_PushInput         at "Vector_Push(&includes)"
-#      HandleMessage           at entry
-# Watches:
-#      ((const IncludedFile *[10])(*includes.items))
-#      *CurFile()
-
-.for i in deeply
-.  for i in nested
-.    for i in include
-.include "include-subsub.mk"
-.    endfor
-.  endfor
-.endfor
-
-.if ${.INCLUDEDFROMFILE} == "include-main.mk"
-.  info sub-after-ok
-.else
-.  warning sub-after-fail(${.INCLUDEDFROMFILE})
-.endif
-
-.for i in once
-.  if ${.INCLUDEDFROMFILE} == "include-main.mk"
-.    info sub-after-for-ok
-.  else
-.    warning sub-after-for-fail(${.INCLUDEDFROMFILE})
-.  endif
-.endfor
diff -r f2a3ff1a2afa -r e3a85c15f8d6 usr.bin/make/unit-tests/include-subsub.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/include-subsub.inc        Thu Jan 19 23:26:14 2023 +0000
@@ -0,0 +1,9 @@
+# $NetBSD: include-subsub.inc,v 1.1 2023/01/19 23:26:14 rillig Exp $
+
+.if ${.INCLUDEDFROMFILE} == "include-sub.inc"
+.MAKEFLAGS: -dp
+.  info subsub-ok
+.MAKEFLAGS: -d0
+.else
+.  warning subsub-fail(${.INCLUDEDFROMFILE})
+.endif
diff -r f2a3ff1a2afa -r e3a85c15f8d6 usr.bin/make/unit-tests/include-subsub.mk
--- a/usr.bin/make/unit-tests/include-subsub.mk Thu Jan 19 22:48:42 2023 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-# $NetBSD: include-subsub.mk,v 1.4 2021/01/26 23:44:56 rillig Exp $
-
-.if ${.INCLUDEDFROMFILE} == "include-sub.mk"
-.MAKEFLAGS: -dp
-.  info subsub-ok
-.MAKEFLAGS: -d0
-.else
-.  warning subsub-fail(${.INCLUDEDFROMFILE})
-.endif



Home | Main Index | Thread Index | Old Index