Module Name:    src
Committed By:   rillig
Date:           Sun Aug  8 16:35:15 UTC 2021

Modified Files:
        src/tests/usr.bin/xlint/lint2: Makefile t_lint2.sh

Log Message:
tests/lint: include but don't run read_lp64 on 32-bit platforms

The lint1 tests are all in the machine-independent file list, which
makes it easier to manage them.  At run time, some of them are skipped
based on platform characteristics.  Do the same for the lint2 tests.

Having the lint2 test named read_lp64 as the only machine-dependent test
would complicate things.

The build for i386 had failed because the files for read_lp64 were
listed in distrib/sets/lists/tests/mi but were not actually installed.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint2/Makefile
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint2/t_lint2.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.bin/xlint/lint2/Makefile
diff -u src/tests/usr.bin/xlint/lint2/Makefile:1.5 src/tests/usr.bin/xlint/lint2/Makefile:1.6
--- src/tests/usr.bin/xlint/lint2/Makefile:1.5	Sun Aug  8 13:22:22 2021
+++ src/tests/usr.bin/xlint/lint2/Makefile	Sun Aug  8 16:35:15 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2021/08/08 13:22:22 rillig Exp $
+# $NetBSD: Makefile,v 1.6 2021/08/08 16:35:15 rillig Exp $
 
 NOMAN=		yes
 
@@ -6,7 +6,7 @@ NOMAN=		yes
 
 TESTSDIR=	${TESTSBASE}/usr.bin/xlint/lint2
 
-TESTS_SH=		t_lint2
+TESTS_SH=	t_lint2
 
 FILESDIR=	${TESTSDIR}
 
@@ -16,9 +16,7 @@ FILESDIR=	${TESTSDIR}
 TESTS+=		msg_${msg}
 .endfor
 TESTS+=		read
-.if ${MACHINE_ARCH:M*64} && !${MACHINE_ARCH:Mmips64*}
-TESTS+=		read_lp64	# only on 64-bit platforms
-.endif
+TESTS+=		read_lp64
 TESTS+=		read_printf
 
 FILES+=		${TESTS:=.ln} ${TESTS:=.exp}

Index: src/tests/usr.bin/xlint/lint2/t_lint2.sh
diff -u src/tests/usr.bin/xlint/lint2/t_lint2.sh:1.4 src/tests/usr.bin/xlint/lint2/t_lint2.sh:1.5
--- src/tests/usr.bin/xlint/lint2/t_lint2.sh:1.4	Sun Aug  8 00:02:02 2021
+++ src/tests/usr.bin/xlint/lint2/t_lint2.sh	Sun Aug  8 16:35:15 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_lint2.sh,v 1.4 2021/08/08 00:02:02 rillig Exp $
+# $NetBSD: t_lint2.sh,v 1.5 2021/08/08 16:35:15 rillig Exp $
 #
 # Copyright (c) 2021 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -51,6 +51,15 @@ atf_init_test_cases()
 	# shellcheck disable=SC2013
 	for i in $(cd "$(atf_get_srcdir)" && echo *.ln); do
 		i=${i%.ln}
+
+		case "$i" in
+		*lp64*)
+			case "$(uname -p)" in
+			*64) ;;
+			*) continue
+			esac
+		esac
+
 		eval "${i}_head() { std_head; }"
 		eval "${i}_body() { std_body '$i'; }"
 		atf_add_test_case "$i"

Reply via email to