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: clean...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a2ebbae9f236
branches: trunk
changeset: 435059:a2ebbae9f236
user: rillig <rillig%pkgsrc.org@localhost>
date: Mon Jun 29 21:24:39 2020 +0000
description:
regress/infra-unittests: clean up tests for haskell.mk
diffstat:
regress/infra-unittests/haskell.sh | 98 +++++++++++++++++--------------------
1 files changed, 45 insertions(+), 53 deletions(-)
diffs (141 lines):
diff -r 45e98a79ab7a -r a2ebbae9f236 regress/infra-unittests/haskell.sh
--- a/regress/infra-unittests/haskell.sh Mon Jun 29 20:51:24 2020 +0000
+++ b/regress/infra-unittests/haskell.sh Mon Jun 29 21:24:39 2020 +0000
@@ -1,5 +1,5 @@
#! /bin/sh
-# $NetBSD: haskell.sh,v 1.4 2020/06/29 20:51:25 rillig Exp $
+# $NetBSD: haskell.sh,v 1.5 2020/06/29 21:24:39 rillig Exp $
#
# Tests for mk/haskell.mk.
#
@@ -325,15 +325,17 @@
create_file_lines "$destdir$prefix/share/doc/x86_64-netbsd-ghc-8.8.1/asn1-parse-0.9.5/html/synopsis.png" ''
create_file_lines "$destdir$prefix/share/doc/x86_64-netbsd-ghc-8.8.1/asn1-parse-0.9.5/LICENSE" ''
+ # By default, the PLIST file is not updated.
"$make" 'plist' 1> "$tmpdir/output" 2>&1 \
&& exitcode=0 || exitcode=$?
assert_that "$tmpdir/output" --file-is-empty
- "$make" 'print-PLIST' 1> "$tmpdir/output" 2>&1 \
+ # Manually generating the PLIST file works though.
+ "$make" 'print-PLIST' 1> "manual-PLIST" 2>&1 \
&& exitcode=0 || exitcode=$?
- assert_that "$tmpdir/output" --file-is-lines \
+ assert_that "manual-PLIST" --file-is-lines \
'@comment $''NetBSD$' \
'${HS_INTF}/package-description' \
'${HS_INTF}/package-id' \
@@ -358,54 +360,6 @@
fi
-if test_case_begin 'plain, update=yes'; then
-
- # TODO
-
- test_case_end
-fi
-
-
-if test_case_begin 'outdated, update=yes'; then
-
- # TODO
-
- test_case_end
-fi
-
-
-if test_case_begin 'lib-ok, update=yes'; then
-
- # TODO
-
- test_case_end
-fi
-
-
-if test_case_begin 'plain, update=no'; then
-
- # TODO
-
- test_case_end
-fi
-
-
-if test_case_begin 'outdated, update=no'; then
-
- # TODO
-
- test_case_end
-fi
-
-
-if test_case_begin 'lib-ok, update=no'; then
-
- # TODO
-
- test_case_end
-fi
-
-
if test_case_begin 'neither package-id nor package-description'; then
# example: textproc/hs-cgrep
@@ -464,7 +418,23 @@
# example: devel/hs-fail
- # TODO
+ create_file 'Makefile' <<-'EOF'
+ DISTNAME= package-1.0
+
+ .include "../../main.mk"
+ .include "../../mk/haskell.mk"
+ EOF
+ create_file 'PLIST' <<-'EOF'
+ ${HS_INTF}/package-description
+ ${HS_INTF}/package-id
+ share/doc/x86_64-netbsd-ghc-8.8.1/fail-${PKGVERSION}/LICENSE
+ EOF
+
+ "$make" 'show-plist-status' 1> "$tmpdir/output" 2>&1 \
+ && exitcode=0 || exitcode=$?
+
+ assert_that "$tmpdir/output" --file-is-lines \
+ 'PLIST status: lib-ok'
test_case_end
fi
@@ -474,7 +444,29 @@
# example: security/hs-SHA
- # TODO
+ create_file 'Makefile' <<-'EOF'
+ DISTFILE= package-1.0
+ .include "../../main.mk"
+ .include "../../mk/haskell.mk"
+ EOF
+ create_file 'PLIST' <<-'EOF'
+ ${HS_INTF}/package-description
+ ${HS_INTF}/package-id
+ ${HS_IMPL}/Data/Digest/Pure/SHA.dyn_hi
+ ${HS_IMPL}/Data/Digest/Pure/SHA.hi
+ ${HS_IMPL}/Data/Digest/Pure/SHA.p_hi
+ ${HS_IMPL}/libHS${HS_PKGID}.a
+ ${HS_IMPL}/libHS${HS_PKGID}_p.a
+ lib/${HS_PLATFORM}/libHS${HS_PKGID}-${HS_VER}.so
+ ${HS_DOCS}/LICENSE
+ ${HS_DOCS}/html/Data-Digest-Pure-SHA.html
+ EOF
+
+ "$make" 'show-plist-status' 1> "$tmpdir/output" 2>&1 \
+ && exitcode=0 || exitcode=$?
+
+ assert_that "$tmpdir/output" --file-is-lines \
+ 'PLIST status: lib-ok'
test_case_end
fi
Home |
Main Index |
Thread Index |
Old Index