Source-Changes-HG archive

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

[src/trunk]: src tests/lint: make list of tests simpler



details:   https://anonhg.NetBSD.org/src/rev/5f145fffc45a
branches:  trunk
changeset: 985091:5f145fffc45a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Aug 08 00:02:02 2021 +0000

description:
tests/lint: make list of tests simpler

Since the file /usr/tests/usr.bin/xlint/lint2/tests has only been in the
file set for a few minutes, it is not marked as obsolete but simply
removed.

diffstat:

 distrib/sets/lists/tests/mi          |  3 +--
 tests/usr.bin/xlint/lint2/Makefile   |  7 +------
 tests/usr.bin/xlint/lint2/t_lint2.sh |  5 +++--
 3 files changed, 5 insertions(+), 10 deletions(-)

diffs (57 lines):

diff -r a538efcb3cc9 -r 5f145fffc45a distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Sat Aug 07 23:52:32 2021 +0000
+++ b/distrib/sets/lists/tests/mi       Sun Aug 08 00:02:02 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1107 2021/08/07 23:52:32 rillig Exp $
+# $NetBSD: mi,v 1.1108 2021/08/08 00:02:02 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -7071,7 +7071,6 @@
 ./usr/tests/usr.bin/xlint/lint2/read_printf.exp                        tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint2/read_printf.ln                 tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint2/t_lint2                                tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/xlint/lint2/tests                          tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/ztest                              tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/ztest/Atffile                      tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/ztest/Kyuafile                     tests-usr.bin-tests     compattestfile,atf,kyua
diff -r a538efcb3cc9 -r 5f145fffc45a tests/usr.bin/xlint/lint2/Makefile
--- a/tests/usr.bin/xlint/lint2/Makefile        Sat Aug 07 23:52:32 2021 +0000
+++ b/tests/usr.bin/xlint/lint2/Makefile        Sun Aug 08 00:02:02 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2021/08/07 23:52:32 rillig Exp $
+# $NetBSD: Makefile,v 1.4 2021/08/08 00:02:02 rillig Exp $
 
 NOMAN=         yes
 
@@ -22,11 +22,6 @@
 TESTS+=                read_printf
 
 FILES+=                ${TESTS:=.ln} ${TESTS:=.exp}
-FILES+=                tests
-
-realall: tests
-tests:
-       printf '%s\n' ${TESTS} > ${.TARGET}
 
 # Note: only works for adding tests.
 # To remove a test, the $$mi file must be edited manually.
diff -r a538efcb3cc9 -r 5f145fffc45a tests/usr.bin/xlint/lint2/t_lint2.sh
--- a/tests/usr.bin/xlint/lint2/t_lint2.sh      Sat Aug 07 23:52:32 2021 +0000
+++ b/tests/usr.bin/xlint/lint2/t_lint2.sh      Sun Aug 08 00:02:02 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_lint2.sh,v 1.3 2021/08/07 23:52:32 rillig Exp $
+# $NetBSD: t_lint2.sh,v 1.4 2021/08/08 00:02:02 rillig Exp $
 #
 # Copyright (c) 2021 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -49,7 +49,8 @@
 atf_init_test_cases()
 {
        # shellcheck disable=SC2013
-       for i in $(cat "$(atf_get_srcdir)/tests"); do
+       for i in $(cd "$(atf_get_srcdir)" && echo *.ln); do
+               i=${i%.ln}
                eval "${i}_head() { std_head; }"
                eval "${i}_body() { std_body '$i'; }"
                atf_add_test_case "$i"



Home | Main Index | Thread Index | Old Index