Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBryan Drewery <bryan@shatow.net>2019-08-03 02:02:43 +0300
committerBryan Drewery <bryan@shatow.net>2019-08-03 02:55:10 +0300
commit5d6aef4b8fde76a3d69090898ecee9ba7a736a94 (patch)
tree646ef7c9245ba4b982fc0464c1700e8fc268184d /test
parent3dd77a91978bc91ee26cacbf883980d093c5bd14 (diff)
IGNORE: Fix and test that IGNORE takes precedence over skipped
Diffstat (limited to 'test')
-rw-r--r--test/Makefile1
-rw-r--r--test/bulk-flavor-ignore-all.sh5
-rw-r--r--test/bulk-ignore-and-skipped.sh39
-rw-r--r--test/ports/ports-mgmt/Makefile1
-rw-r--r--test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/Makefile61
-rw-r--r--test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/distinfo3
-rw-r--r--test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/pkg-descr5
-rw-r--r--test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/pkg-plist98
8 files changed, 212 insertions, 1 deletions
diff --git a/test/Makefile b/test/Makefile
index 967af6fa..f298c61e 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -19,6 +19,7 @@ TESTS=\
bulk-ignore-dep-skipped.sh \
bulk-ignore-listed-skipped-dep.sh \
bulk-ignore-listed-dep.sh \
+ bulk-ignore-and-skipped.sh \
bulk-flavor-default-dep-and-specific-listed.sh \
bulk-flavor-default-dep.sh \
bulk-flavor-main-dep-and-default-listed.sh \
diff --git a/test/bulk-flavor-ignore-all.sh b/test/bulk-flavor-ignore-all.sh
index bb2291c1..b8241e09 100644
--- a/test/bulk-flavor-ignore-all.sh
+++ b/test/bulk-flavor-ignore-all.sh
@@ -10,7 +10,7 @@ ${SUDO} ${POUDRIEREPATH} -e ${POUDRIERE_ETC} bulk -n -CNt \
assert 0 $? "Bulk should pass"
# Assert that IGNOREDPORTS was populated by the framework right.
-assert "ports-mgmt/poudriere-devel-IGNORED misc/foo@IGNORED" \
+assert "ports-mgmt/poudriere-devel-IGNORED ports-mgmt/poudriere-devel-IGNORED-and-skipped misc/foo@IGNORED" \
"${IGNOREDPORTS-null}" "IGNOREDPORTS should match"
# Assert that skipped ports are right
@@ -33,3 +33,6 @@ assert_skipped "${SKIPPEDPORTS}"
expand_origin_flavors "${LISTPORTS_NOIGNORED}" expanded_LISTPORTS_NOIGNORED
list_all_deps "${expanded_LISTPORTS_NOIGNORED}" ALL_EXPECTED
assert_queued "" "${ALL_EXPECTED}"
+
+# Assert stats counts are right
+assert_counts
diff --git a/test/bulk-ignore-and-skipped.sh b/test/bulk-ignore-and-skipped.sh
new file mode 100644
index 00000000..b55da94d
--- /dev/null
+++ b/test/bulk-ignore-and-skipped.sh
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+LISTPORTS="ports-mgmt/poudriere-devel ports-mgmt/poudriere-devel-IGNORED-and-skipped"
+# IGNORE should take precedence over skipped.
+. common.bulk.sh
+
+${SUDO} ${POUDRIEREPATH} -e ${POUDRIERE_ETC} bulk -n -CNt \
+ -B "${BUILDNAME}" \
+ -j "${JAILNAME}" -p "${PTNAME}" ${SETNAME:+-z "${SETNAME}"} \
+ ${LISTPORTS}
+assert 0 $? "Bulk should pass"
+
+# Assert the non-ignored ports list is right
+assert "ports-mgmt/poudriere-devel" "${LISTPORTS_NOIGNORED}" "LISTPORTS_NOIGNORED should match"
+
+# Assert that IGNOREDPORTS was populated by the framework right.
+assert "ports-mgmt/poudriere-devel-IGNORED-and-skipped ports-mgmt/poudriere-devel-IGNORED" \
+ "${IGNOREDPORTS-null}" "IGNOREDPORTS should match"
+
+# Assert that skipped ports are right
+assert "" "${SKIPPEDPORTS-null}" "SKIPPEDPORTS should match"
+
+# Assert that only listed packages are in poudriere.ports.queued as 'listed'
+assert_queued "listed" "${LISTPORTS_NOIGNORED}"
+
+# Assert the IGNOREd ports are tracked in .poudriere.ports.ignored
+assert_ignored "${IGNOREDPORTS}"
+
+# Assert that SKIPPED ports are right
+assert_skipped "${SKIPPEDPORTS}"
+
+# Assert that all expected dependencies are in poudriere.ports.queued (since
+# they do not exist yet)
+expand_origin_flavors "${LISTPORTS_NOIGNORED}" expanded_LISTPORTS_NOIGNORED
+list_all_deps "${expanded_LISTPORTS_NOIGNORED}" ALL_EXPECTED
+assert_queued "" "${ALL_EXPECTED}"
+
+# Assert stats counts are right
+assert_counts
diff --git a/test/ports/ports-mgmt/Makefile b/test/ports/ports-mgmt/Makefile
index 4d96b9ef..da3e49d4 100644
--- a/test/ports/ports-mgmt/Makefile
+++ b/test/ports/ports-mgmt/Makefile
@@ -2,6 +2,7 @@ SUBDIR += pkg
SUBDIR += poudriere-devel
SUBDIR += poudriere-devel-dep-IGNORED
SUBDIR += poudriere-devel-dep2-IGNORED
+SUBDIR += poudriere-devel-IGNORED-and-skipped
SUBDIR += poudriere-devel-IGNORED
# Would break bulk -a test
#SUBDIR += poudriere-devel-bad-dep_args
diff --git a/test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/Makefile b/test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/Makefile
new file mode 100644
index 00000000..4bb55e0a
--- /dev/null
+++ b/test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/Makefile
@@ -0,0 +1,61 @@
+# $FreeBSD: head/ports-mgmt/poudriere-devel/Makefile 442301 2017-06-01 17:21:46Z bdrewery $
+
+PORTNAME= poudriere
+DISTVERSION= 3.1.99.20170601
+PORTREVISION= 1
+CATEGORIES= ports-mgmt
+MASTER_SITES= LOCAL/bdrewery/${PORTNAME}/ \
+ http://mirror.shatow.net/freebsd/${PORTNAME}/ \
+ GH
+PKGNAMESUFFIX= -devel-IGNORED-and-skipped
+
+IGNORE= ignored and skipped
+
+MAINTAINER= bdrewery@FreeBSD.org
+COMMENT= Port build and test system
+
+LICENSE= BSD2CLAUSE
+
+CONFLICTS_INSTALL= poudriere-[0-9]*
+
+USE_GITHUB= yes
+GH_ACCOUNT= freebsd
+GH_TAGNAME= 3.0-2145-gdc462a9d
+#DISTNAME= ${GH_ACCOUNT}-${GH_PROJECT}-${GH_TAGNAME}
+
+GNU_CONFIGURE= yes
+ETCDIR= ${PREFIX}/etc/poudriere.d
+
+OPTIONS_DEFINE= ZSH EXAMPLES
+OPTIONS_DEFAULT=ZSH
+OPTIONS_SUB= yes
+
+RUN_DEPENDS+= freebsd-release-manifests>0:misc/freebsd-release-manifests
+RUN_DEPENDS+= poudriere-devel-IGNORED>0:ports-mgmt/poudriere-devel-IGNORED
+
+.include <bsd.port.options.mk>
+
+# rm -x support came in 10.0. A bundled rm is used if not supported in base.
+# While <10 is technically not supported in the Ports Tree, Poudriere
+# detects this and it being a package build tool it should still be
+# supported as a user may be installing this to build packages for upgrading
+# their system to a supported release.
+.if ${OSVERSION} < 1000000
+PLIST_SUB+= RM=""
+.else
+PLIST_SUB+= RM="@comment "
+.endif
+
+pre-install:
+ ${REINPLACE_CMD} \
+ -e "s,^\(POUDRIERE_VERSION\)=.*,\1='${PKGVERSION}'," \
+ ${WRKSRC}/src/bin/poudriere
+
+post-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
+ ${INSTALL_DATA} ${WRKSRC}/completions/zsh/_poudriere \
+ ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
+ ${LN} -fs ${LOCALBASE}/share/freebsd/MANIFESTS \
+ ${STAGEDIR}${DATADIR}/MANIFESTS
+
+.include <bsd.port.mk>
diff --git a/test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/distinfo b/test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/distinfo
new file mode 100644
index 00000000..ae627c4a
--- /dev/null
+++ b/test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1496337650
+SHA256 (freebsd-poudriere-3.1.99.20170601-3.0-2145-gdc462a9d_GH0.tar.gz) = 294e3379661aa8b6879794e4e01c4eb8c962a2060bae412bea4c61ea4127f8c6
+SIZE (freebsd-poudriere-3.1.99.20170601-3.0-2145-gdc462a9d_GH0.tar.gz) = 2986209
diff --git a/test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/pkg-descr b/test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/pkg-descr
new file mode 100644
index 00000000..3e950072
--- /dev/null
+++ b/test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/pkg-descr
@@ -0,0 +1,5 @@
+poudriere is a tool primarily designed to test package production on
+FreeBSD. However, most people will find it useful to bulk build ports
+for FreeBSD.
+
+WWW: https://github.com/freebsd/poudriere/wiki
diff --git a/test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/pkg-plist b/test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/pkg-plist
new file mode 100644
index 00000000..b271ff6a
--- /dev/null
+++ b/test/ports/ports-mgmt/poudriere-devel-IGNORED-and-skipped/pkg-plist
@@ -0,0 +1,98 @@
+bin/poudriere
+@sample etc/poudriere.conf.sample
+%%ETCDIR%%/hooks/bulk.sh.sample
+%%ETCDIR%%/hooks/pkgbuild.sh.sample
+@sample etc/poudriered.conf.sample
+etc/rc.d/poudriered
+libexec/poudriere/cachec
+libexec/poudriere/cached
+libexec/poudriere/clock
+libexec/poudriere/cpdup
+libexec/poudriere/dirempty
+libexec/poudriere/dirwatch
+libexec/poudriere/jexecd
+libexec/poudriere/locked_mkdir
+libexec/poudriere/nc
+libexec/poudriere/poudriered
+libexec/poudriere/ptsort
+libexec/poudriere/pwait
+libexec/poudriere/rename
+libexec/poudriere/rexec
+%%RM%%libexec/poudriere/rm
+libexec/poudriere/sh
+libexec/poudriere/timeout
+libexec/poudriere/timestamp
+libexec/poudriere/tsort
+man/man8/poudriere.8.gz
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/httpd.conf.sample
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/nginx.conf.sample
+%%DATADIR%%/MANIFESTS
+%%DATADIR%%/awk/dependency_loop.awk
+%%DATADIR%%/awk/humanize.awk
+%%DATADIR%%/awk/json.awk
+%%DATADIR%%/awk/json_jail.awk
+%%DATADIR%%/awk/json_top.awk
+%%DATADIR%%/awk/processonelog2.awk
+%%DATADIR%%/awk/siginfo_buildtime.awk
+%%DATADIR%%/api.sh
+%%DATADIR%%/bulk.sh
+%%DATADIR%%/clean.sh
+%%DATADIR%%/common.sh
+%%DATADIR%%/daemon.sh
+%%DATADIR%%/distclean.sh
+%%DATADIR%%/html/assets/DataTables-1.10.0/css/jquery.dataTables.min.css
+%%DATADIR%%/html/assets/DataTables-1.10.0/css/jquery.dataTables_themeroller.min.css
+%%DATADIR%%/html/assets/DataTables-1.10.0/images/back_disabled.png
+%%DATADIR%%/html/assets/DataTables-1.10.0/images/back_enabled.png
+%%DATADIR%%/html/assets/DataTables-1.10.0/images/back_enabled_hover.png
+%%DATADIR%%/html/assets/DataTables-1.10.0/images/forward_disabled.png
+%%DATADIR%%/html/assets/DataTables-1.10.0/images/forward_enabled.png
+%%DATADIR%%/html/assets/DataTables-1.10.0/images/forward_enabled_hover.png
+%%DATADIR%%/html/assets/DataTables-1.10.0/images/sort_asc.png
+%%DATADIR%%/html/assets/DataTables-1.10.0/images/sort_asc_disabled.png
+%%DATADIR%%/html/assets/DataTables-1.10.0/images/sort_both.png
+%%DATADIR%%/html/assets/DataTables-1.10.0/images/sort_desc.png
+%%DATADIR%%/html/assets/DataTables-1.10.0/images/sort_desc_disabled.png
+%%DATADIR%%/html/assets/DataTables-1.10.0/js/jquery.dataTables.min.js
+%%DATADIR%%/html/assets/bootstrap-3.1.1/css/bootstrap-theme.min.css
+%%DATADIR%%/html/assets/bootstrap-3.1.1/css/bootstrap.min.css
+%%DATADIR%%/html/assets/bootstrap-3.1.1/fonts/glyphicons-halflings-regular.eot
+%%DATADIR%%/html/assets/bootstrap-3.1.1/fonts/glyphicons-halflings-regular.svg
+%%DATADIR%%/html/assets/bootstrap-3.1.1/fonts/glyphicons-halflings-regular.ttf
+%%DATADIR%%/html/assets/bootstrap-3.1.1/fonts/glyphicons-halflings-regular.woff
+%%DATADIR%%/html/assets/bootstrap-3.1.1/js/bootstrap.min.js
+%%DATADIR%%/html/assets/favicon.ico
+%%DATADIR%%/html/assets/jquery-1.11.1.js
+%%DATADIR%%/html/assets/jquery-1.11.1.min.js
+%%DATADIR%%/html/assets/jquery-1.11.1.min.map
+%%DATADIR%%/html/assets/jquery.dataTables.rowGrouping-1.2.9.js
+%%DATADIR%%/html/assets/logo.svg
+%%DATADIR%%/html/assets/poudriere.css
+%%DATADIR%%/html/assets/poudriere.js
+%%DATADIR%%/html/build.html
+%%DATADIR%%/html/index.html
+%%DATADIR%%/html/jail.html
+%%DATADIR%%/html/robots.txt
+%%DATADIR%%/image.sh
+%%DATADIR%%/include/cache.sh
+%%DATADIR%%/include/colors.pre.sh
+%%DATADIR%%/include/colors.sh
+%%DATADIR%%/include/common.sh.dragonfly
+%%DATADIR%%/include/common.sh.freebsd
+%%DATADIR%%/include/display.sh
+%%DATADIR%%/include/fs.sh
+%%DATADIR%%/include/hash.sh
+%%DATADIR%%/include/html.sh
+%%DATADIR%%/include/parallel.sh
+%%DATADIR%%/include/shared_hash.sh
+%%DATADIR%%/include/util.sh
+%%DATADIR%%/jail.sh
+%%DATADIR%%/logclean.sh
+%%DATADIR%%/options.sh
+%%DATADIR%%/pkgclean.sh
+%%DATADIR%%/ports.sh
+%%DATADIR%%/processonelog.sh
+%%DATADIR%%/queue.sh
+%%DATADIR%%/status.sh
+%%DATADIR%%/testport.sh
+%%ZSH%%share/zsh/site-functions/_poudriere