Source-Changes-HG archive

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

[src/trunk]: src tests/lint: rename expected .ln file to .exp-ln



details:   https://anonhg.NetBSD.org/src/rev/552299ab43ef
branches:  trunk
changeset: 984193:552299ab43ef
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jun 27 09:22:31 2021 +0000

description:
tests/lint: rename expected .ln file to .exp-ln

This way, the hack for suffixes is no longer needed.

diffstat:

 distrib/sets/lists/tests/mi                |   5 +-
 tests/usr.bin/xlint/lint1/Makefile         |  18 +---------
 tests/usr.bin/xlint/lint1/emit.exp-ln      |  52 ++++++++++++++++++++++++++++++
 tests/usr.bin/xlint/lint1/emit.ln          |  52 ------------------------------
 tests/usr.bin/xlint/lint1/t_integration.sh |  10 ++--
 5 files changed, 62 insertions(+), 75 deletions(-)

diffs (204 lines):

diff -r 61dda22798ac -r 552299ab43ef distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Sun Jun 27 09:13:08 2021 +0000
+++ b/distrib/sets/lists/tests/mi       Sun Jun 27 09:22:31 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1063 2021/06/20 18:09:48 rillig Exp $
+# $NetBSD: mi,v 1.1064 2021/06/27 09:22:31 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -6201,7 +6201,8 @@
 ./usr/tests/usr.bin/xlint/lint1/decl_struct_member.c           tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/decl_struct_member.exp         tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/emit.c                         tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/xlint/lint1/emit.exp                       tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/emit.exp                       tests-obsolete          obsolete
+./usr/tests/usr.bin/xlint/lint1/emit.exp-ln                    tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/emit.ln                                tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/expr_range.c                   tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/expr_range.exp                 tests-usr.bin-tests     compattestfile,atf
diff -r 61dda22798ac -r 552299ab43ef tests/usr.bin/xlint/lint1/Makefile
--- a/tests/usr.bin/xlint/lint1/Makefile        Sun Jun 27 09:13:08 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/Makefile        Sun Jun 27 09:22:31 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.65 2021/06/20 18:09:48 rillig Exp $
+# $NetBSD: Makefile,v 1.66 2021/06/27 09:22:31 rillig Exp $
 
 NOMAN=         # defined
 MAX_MESSAGE=   344             # see lint1/err.c
@@ -106,7 +106,7 @@
 FILES+=                decl_struct_member.exp
 FILES+=                emit.c
 FILES+=                emit.exp
-FILES+=                emit.ln
+FILES+=                emit.exp-ln
 FILES+=                expr_range.c
 FILES+=                expr_range.exp
 FILES+=                feat_stacktrace.c
@@ -141,20 +141,6 @@
 FILES+=                stmt_for.c
 FILES+=                stmt_for.exp
 
-# ----- begin hack -----
-# Prevent that ${DESTDIR}/emit.ln gets ${DESTDIR}/emit.c as implicit source.
-# The suffix transformation rule '.c.ln' thinks that ${DESTDIR}/emit.ln should
-# depend in ${DESTDIR}/emit.c, but these files are not intended to depend on
-# each other, they have these suffixes just for convenience and convention.
-.if make(install)
-.  if ${MKUPDATE} == "no"      # see bsd.files.mk
-${DESTDIR}${FILESDIR}/emit.ln! .PHONY
-.  else
-${DESTDIR}${FILESDIR}/emit.ln: .PHONY
-.  endif
-.endif
-# ----- end hack -----
-
 # Note: only works for adding tests.
 # To remove a test, the $$mi file must be edited manually.
 sync-mi: .PHONY
diff -r 61dda22798ac -r 552299ab43ef tests/usr.bin/xlint/lint1/emit.exp-ln
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/emit.exp-ln     Sun Jun 27 09:22:31 2021 +0000
@@ -0,0 +1,52 @@
+0semit.c
+Semit.c
+47d0.47e12extern__BoolB
+48d0.48e21extern__Complex_floatsX
+49d0.49e22extern__Complex_doubleX
+50d0.50e27extern__Complex_long_doublelX
+51d0.51e11extern_charC
+52d0.52e18extern_signed_charsC
+53d0.53e20extern_unsigned_charuC
+54d0.54e12extern_shortS
+55d0.55e19extern_signed_shortS
+56d0.56e21extern_unsigned_shortuS
+57d0.57e10extern_intI
+58d0.58e17extern_signed_intI
+59d0.59e19extern_unsigned_intuI
+60d0.60e11extern_longL
+61d0.61e18extern_signed_longL
+62d0.62e20extern_unsigned_longuL
+63d0.63e16extern_long_longQ
+64d0.64e23extern_signed_long_longQ
+65d0.65e25extern_unsigned_long_longuQ
+66d0.66e12extern_floatsD
+67d0.67e13extern_doubleD
+68d0.68e18extern_long_doublelD
+74d0.74e22extern_pointer_to_voidPV
+75d0.75e21extern_array_5_of_intA5I
+82d0.82e17extern_struct_tagsT110struct_tag
+83d0.83e21extern_struct_typedefsT214struct_typedef
+84d0.84e16extern_union_taguT19union_tag
+85d0.85e20extern_union_typedefuT213union_typedef
+86d0.86e15extern_enum_tageT18enum_tag
+87d0.87e19extern_enum_typedefeT212enum_typedef
+91d0.91e23extern_anonymous_structsT389.0.0
+94d0.94e22extern_anonymous_unionuT392.0.0
+97d0.97e21extern_anonymous_enumeT395.0.0
+105d0.105e12declared_intI
+106d0.106t11defined_intI
+113d0.113e16extern_const_intcI
+114d0.114e19extern_volatile_intvI
+115d0.115e25extern_const_volatile_intcvI
+121d0.121e30return_void_unknown_parametersFV
+122d0.122e38return_implicit_int_unknown_parametersFI
+125d0.125e32extern_return_void_no_parametersF0V
+126d0.126e25return_void_no_parametersF0V
+127d0.127es32static_return_void_no_parametersF0V
+129d0.129e10taking_intF1IV
+131d0.131e16taking_const_intF1cIV
+132d0.132e22taking_int_double_boolF3IDBV
+134d0.133e29taking_struct_union_enum_tagsF3sT110struct_taguT19union_tageT18enum_tagV
+136d0.135e33taking_struct_union_enum_typedefsF3sT214struct_typedefuT213union_typedefeT212enum_typedefV
+138d0.138e14taking_varargsF2PcCEV
+146d0.146es15static_functionF0I
diff -r 61dda22798ac -r 552299ab43ef tests/usr.bin/xlint/lint1/emit.ln
--- a/tests/usr.bin/xlint/lint1/emit.ln Sun Jun 27 09:13:08 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-0semit.c
-Semit.c
-47d0.47e12extern__BoolB
-48d0.48e21extern__Complex_floatsX
-49d0.49e22extern__Complex_doubleX
-50d0.50e27extern__Complex_long_doublelX
-51d0.51e11extern_charC
-52d0.52e18extern_signed_charsC
-53d0.53e20extern_unsigned_charuC
-54d0.54e12extern_shortS
-55d0.55e19extern_signed_shortS
-56d0.56e21extern_unsigned_shortuS
-57d0.57e10extern_intI
-58d0.58e17extern_signed_intI
-59d0.59e19extern_unsigned_intuI
-60d0.60e11extern_longL
-61d0.61e18extern_signed_longL
-62d0.62e20extern_unsigned_longuL
-63d0.63e16extern_long_longQ
-64d0.64e23extern_signed_long_longQ
-65d0.65e25extern_unsigned_long_longuQ
-66d0.66e12extern_floatsD
-67d0.67e13extern_doubleD
-68d0.68e18extern_long_doublelD
-74d0.74e22extern_pointer_to_voidPV
-75d0.75e21extern_array_5_of_intA5I
-82d0.82e17extern_struct_tagsT110struct_tag
-83d0.83e21extern_struct_typedefsT214struct_typedef
-84d0.84e16extern_union_taguT19union_tag
-85d0.85e20extern_union_typedefuT213union_typedef
-86d0.86e15extern_enum_tageT18enum_tag
-87d0.87e19extern_enum_typedefeT212enum_typedef
-91d0.91e23extern_anonymous_structsT389.0.0
-94d0.94e22extern_anonymous_unionuT392.0.0
-97d0.97e21extern_anonymous_enumeT395.0.0
-105d0.105e12declared_intI
-106d0.106t11defined_intI
-113d0.113e16extern_const_intcI
-114d0.114e19extern_volatile_intvI
-115d0.115e25extern_const_volatile_intcvI
-121d0.121e30return_void_unknown_parametersFV
-122d0.122e38return_implicit_int_unknown_parametersFI
-125d0.125e32extern_return_void_no_parametersF0V
-126d0.126e25return_void_no_parametersF0V
-127d0.127es32static_return_void_no_parametersF0V
-129d0.129e10taking_intF1IV
-131d0.131e16taking_const_intF1cIV
-132d0.132e22taking_int_double_boolF3IDBV
-134d0.133e29taking_struct_union_enum_tagsF3sT110struct_taguT19union_tageT18enum_tagV
-136d0.135e33taking_struct_union_enum_typedefsF3sT214struct_typedefuT213union_typedefeT212enum_typedefV
-138d0.138e14taking_varargsF2PcCEV
-146d0.146es15static_functionF0I
diff -r 61dda22798ac -r 552299ab43ef tests/usr.bin/xlint/lint1/t_integration.sh
--- a/tests/usr.bin/xlint/lint1/t_integration.sh        Sun Jun 27 09:13:08 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/t_integration.sh        Sun Jun 27 09:22:31 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_integration.sh,v 1.57 2021/06/20 18:09:48 rillig Exp $
+# $NetBSD: t_integration.sh,v 1.58 2021/06/27 09:22:31 rillig Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -58,12 +58,12 @@
 {
        local src="$(atf_get_srcdir)/$1"
        local exp="${src%.c}.exp"
-       local src_ln="${src%.c}.ln"
+       local exp_ln="${src%.c}.ln"
        local wrk_ln="${1%.c}.ln"
        local flags="$(extract_flags "$src")"
 
-       if [ ! -f "$src_ln" ]; then
-               src_ln='/dev/null'
+       if [ ! -f "$exp_ln" ]; then
+               exp_ln='/dev/null'
                wrk_ln='/dev/null'
        fi
 
@@ -78,7 +78,7 @@
        fi
 
        if [ "$src_ln" != '/dev/null' ]; then
-               atf_check -o "file:$src_ln" cat "$wrk_ln"
+               atf_check -o "file:$exp_ln" cat "$wrk_ln"
        fi
 }
 



Home | Main Index | Thread Index | Old Index