Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/regress/infra-unittests regress/infra-unittests: add t...
details: https://anonhg.NetBSD.org/pkgsrc/rev/9ecff91eb277
branches: trunk
changeset: 430859:9ecff91eb277
user: rillig <rillig%pkgsrc.org@localhost>
date: Tue May 05 06:11:29 2020 +0000
description:
regress/infra-unittests: add tests for portability checks
Files like Makefile.am and configure.ac are usually not used during a
build, therefore there's no point in checking these for shell portability
issues.
diffstat:
regress/infra-unittests/check-portability.sh | 45 +++++++++++++++++++++++++++-
1 files changed, 44 insertions(+), 1 deletions(-)
diffs (60 lines):
diff -r 2f0ae0c50a42 -r 9ecff91eb277 regress/infra-unittests/check-portability.sh
--- a/regress/infra-unittests/check-portability.sh Tue May 05 06:06:19 2020 +0000
+++ b/regress/infra-unittests/check-portability.sh Tue May 05 06:11:29 2020 +0000
@@ -1,5 +1,5 @@
#! /bin/sh
-# $NetBSD: check-portability.sh,v 1.3 2020/05/05 05:55:25 rillig Exp $
+# $NetBSD: check-portability.sh,v 1.4 2020/05/05 06:11:29 rillig Exp $
#
# Test cases for mk/check/check-portability.*.
#
@@ -120,6 +120,49 @@
fi
+if test_case_begin 'Makefile.in patched, Makefile.am bad'; then
+
+ # As of 2020-05-05, Makefile.am is not checked at all since only
+ # very few packages actually use that file during the build.
+
+ create_file_lines 'work/patches/patch-aa' \
+ '+++ Makefile.in 2020-05-05'
+ create_file_lines 'work/Makefile.in' \
+ 'test a = b'
+ create_file_lines 'work/Makefile.am' \
+ 'test a == b'
+
+ check_portability_sh \
+ 'CHECK_PORTABILITY_EXPERIMENTAL=yes'
+
+ assert_that "out" --file-is-empty
+ assert_that $exitcode --equals 0
+
+ test_case_end
+fi
+
+
+if test_case_begin 'files that are usually not used for building'; then
+
+ # The following files are mostly interesting to the upstream
+ # developers and are not used during the actual build, except
+ # if the package rebuilds everything using the GNU autotools.
+
+ create_file_lines 'work/configure.ac' \
+ 'test a == b'
+ create_file_lines 'work/Makefile.am' \
+ 'test a == b'
+
+ check_portability_sh \
+ 'CHECK_PORTABILITY_EXPERIMENTAL=yes'
+
+ assert_that "out" --file-is-empty
+ assert_that $exitcode --equals 0
+
+ test_case_end
+fi
+
+
if test_case_begin 'configure patched and still bad'; then
create_file_lines 'work/patches/patch-aa' \
Home |
Main Index |
Thread Index |
Old Index