pkgsrc-Changes archive

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

CVS commit: pkgsrc/regress/infra-unittests



Module Name:    pkgsrc
Committed By:   rillig
Date:           Tue May  5 06:11:29 UTC 2020

Modified Files:
        pkgsrc/regress/infra-unittests: check-portability.sh

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/regress/infra-unittests/check-portability.sh

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

Modified files:

Index: pkgsrc/regress/infra-unittests/check-portability.sh
diff -u pkgsrc/regress/infra-unittests/check-portability.sh:1.3 pkgsrc/regress/infra-unittests/check-portability.sh:1.4
--- pkgsrc/regress/infra-unittests/check-portability.sh:1.3     Tue May  5 05:55:25 2020
+++ pkgsrc/regress/infra-unittests/check-portability.sh Tue May  5 06:11:29 2020
@@ -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 @@ if test_case_begin 'configure patched, c
 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