* [gentoo-commits] proj/portage-utils:master commit in: tests/qmerge/
@ 2015-02-24 1:26 Mike Frysinger
0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger @ 2015-02-24 1:26 UTC (permalink / raw
To: gentoo-commits
commit: a421b23251a7e997a0f5bf99f9ac6ec346d694a8
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 24 01:15:32 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Feb 24 01:15:32 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/portage-utils.git;a=commit;h=a421b232
tests: qmerge: fix running in nocolor mode
---
tests/qmerge/dotest | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/qmerge/dotest b/tests/qmerge/dotest
index fac6437..e5a9c23 100755
--- a/tests/qmerge/dotest
+++ b/tests/qmerge/dotest
@@ -29,7 +29,7 @@ tend $? "qmerge-test: [N] basic merge" || echo "${out}"
[[ ${out} != *"FAIL"* ]]
tend $? "qmerge-test: [N] FAIL messages" || echo "${out}"
-order=$(echo "${out}" | awk '$1 == ">>>" { printf "%s ", $NF }')
+order=$(echo "${out}" | awk '$1 == ">>>" && $2 ~ /^pkg_/ { printf "%s ", $NF }')
[[ ${order} == "pkg_pretend pkg_setup pkg_preinst pkg_postinst " ]]
tend $? "qmerge-test: [N] pkg_* order of execution" || printf '%s\n' "${order}" "${out}"
@@ -49,7 +49,7 @@ tend $? "qmerge-test: [R] re-emerge" || echo "${out}"
[[ -x ${ROOT}/usr/bin/qmerge-test ]]
tend $? "qmerge-test: [R] installed expected files" || treedir "${ROOT}"
-order=$(echo "${out}" | awk '$1 == ">>>" { printf "%s ", $NF }')
+order=$(echo "${out}" | awk '$1 == ">>>" && $2 ~ /^pkg_/ { printf "%s ", $NF }')
[[ ${order} == "pkg_pretend pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm " ]]
tend $? "qmerge-test: [R] pkg_* order of execution" || printf '%s\n' "${order}" "${out}"
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/portage-utils:master commit in: tests/qmerge/
@ 2016-12-29 2:25 Mike Frysinger
0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger @ 2016-12-29 2:25 UTC (permalink / raw
To: gentoo-commits
commit: eb668be31eb42e462b2413eae866a76995cc6983
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 28 23:37:10 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Dec 28 23:37:10 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=eb668be3
tests: ignore emaint failures for non-Gentoo systems (i.e. travis)
tests/qmerge/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/qmerge/Makefile b/tests/qmerge/Makefile
index 90f7b77..bf45e53 100644
--- a/tests/qmerge/Makefile
+++ b/tests/qmerge/Makefile
@@ -9,8 +9,10 @@ all: test
test check: $(PACKAGES)
$(Q)$(s)/dotest
+# Ignore failures to pass tests on non-Gentoo hosts.
+# Hopefully we don't hit real failures on Gentoo systems ...
$(PACKAGES): $(wildcard $(PKGDIR)/*/*.tbz2)
- PKGDIR=$(PKGDIR) emaint binhost -f
+ PKGDIR=$(PKGDIR) emaint binhost -f || :
clean:
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/portage-utils:master commit in: tests/qmerge/
@ 2019-05-10 11:52 Fabian Groffen
0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2019-05-10 11:52 UTC (permalink / raw
To: gentoo-commits
commit: 3d1497795246724e8f7b03e90272ed4dcbc950c1
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri May 10 11:43:25 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri May 10 11:43:25 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=3d149779
tests/qmerge: DEFINED_PHASES of test package is empty
pkg_prerm and postrm won't be run because they aren't defined
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
tests/qmerge/dotest | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qmerge/dotest b/tests/qmerge/dotest
index 224f3b9..57e2940 100755
--- a/tests/qmerge/dotest
+++ b/tests/qmerge/dotest
@@ -56,7 +56,7 @@ tend $? "qmerge-test: [R] re-emerge" || echo "${out}"
tend $? "qmerge-test: [R] installed expected files" || treedir "${ROOT}"
order=$(echo "${out}" | awk '$1 == ">>>" && $2 ~ /^pkg_/ { printf "%s ", $NF }')
-[[ ${order} == "pkg_pretend pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm " ]]
+[[ ${order} == "pkg_pretend pkg_setup pkg_preinst pkg_postinst " ]]
tend $? "qmerge-test: [R] pkg_* order of execution" || printf '%s\n' "${order}" "${out}"
[[ -x ${ROOT}/usr/bin/qmerge-test && \
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/portage-utils:master commit in: tests/qmerge/
@ 2019-06-10 10:09 Fabian Groffen
0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2019-06-10 10:09 UTC (permalink / raw
To: gentoo-commits
commit: 317a31dfc1519d8baa10bca736f719faa83692b8
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 10 10:05:12 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Jun 10 10:05:12 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=317a31df
tests/qmerge: drop restriction on Gentoo system
define VDB path such that qmerge tests can run successfully anywhere,
most notably by Travis, so we don't silently get breakage
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
tests/qmerge/dotest | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/tests/qmerge/dotest b/tests/qmerge/dotest
index 57e2940..17187f9 100755
--- a/tests/qmerge/dotest
+++ b/tests/qmerge/dotest
@@ -1,11 +1,5 @@
#!/bin/bash
-# TODO: Make these work with local vdb instead of requiring /.
-if [[ -n ${TRAVIS_OS_NAME} ]] ; then
- echo "TODO: Make it work on non-Gentoo system"
- exit 0
-fi
-
. ../init.sh || exit 1
set -e
@@ -14,14 +8,11 @@ export QMERGE=1
export PKGDIR=${as}/packages
export FEATURES='config-protect-if-modified'
-if [[ ! -e ${PKGDIR}/Packages ]] ; then
- emaint binhost -f
-fi
-
mktmpdir
export ROOT=${PWD}/root
export PORTAGE_TMPDIR=${PWD}
+export Q_VDB=/var/db/pkg
mkdir -p "${ROOT}/var/db/pkg"
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/portage-utils:master commit in: tests/qmerge/
@ 2019-06-10 12:50 Fabian Groffen
0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2019-06-10 12:50 UTC (permalink / raw
To: gentoo-commits
commit: 503044450b77a64949bb15d65d4d5ecfc2b3c2d0
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 10 12:29:47 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Jun 10 12:29:47 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=50304445
buildsys: regenerate
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
tests/qmerge/Makefile.in | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/tests/qmerge/Makefile.in b/tests/qmerge/Makefile.in
index 274a0fe..77774dc 100644
--- a/tests/qmerge/Makefile.in
+++ b/tests/qmerge/Makefile.in
@@ -1395,8 +1395,6 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
this_subdir = tests/qmerge
s = $(abs_top_srcdir)/$(this_subdir)
-PKGDIR = $(s)/packages
-PACKAGES = $(PKGDIR)/Packages
all: all-am
.SUFFIXES:
@@ -1594,14 +1592,9 @@ uninstall-am:
.PRECIOUS: Makefile
-check-local: $(PACKAGES)
+check-local:
$(Q)$(s)/dotest
-# Ignore failures to pass tests on non-Gentoo hosts.
-# Hopefully we don't hit real failures on Gentoo systems ...
-$(PACKAGES): $(wildcard $(PKGDIR)/*/*.tbz2)
- PKGDIR=$(PKGDIR) emaint binhost -f || :
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/portage-utils:master commit in: tests/qmerge/
@ 2019-06-10 12:50 Fabian Groffen
0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2019-06-10 12:50 UTC (permalink / raw
To: gentoo-commits
commit: 96e0ade61c8f7549f5b3e301e1d4a54b66761bd1
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 10 12:29:21 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Jun 10 12:29:21 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=96e0ade6
tests/qmerge: drop unnecessary emaint call
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
tests/qmerge/Makefile.am | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/tests/qmerge/Makefile.am b/tests/qmerge/Makefile.am
index 62ca5d2..bbf462f 100644
--- a/tests/qmerge/Makefile.am
+++ b/tests/qmerge/Makefile.am
@@ -1,13 +1,5 @@
this_subdir = tests/qmerge
s = $(abs_top_srcdir)/$(this_subdir)
-PKGDIR = $(s)/packages
-PACKAGES = $(PKGDIR)/Packages
-
-check-local: $(PACKAGES)
+check-local:
$(Q)$(s)/dotest
-
-# Ignore failures to pass tests on non-Gentoo hosts.
-# Hopefully we don't hit real failures on Gentoo systems ...
-$(PACKAGES): $(wildcard $(PKGDIR)/*/*.tbz2)
- PKGDIR=$(PKGDIR) emaint binhost -f || :
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/portage-utils:master commit in: tests/qmerge/
@ 2019-06-10 15:29 Fabian Groffen
0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2019-06-10 15:29 UTC (permalink / raw
To: gentoo-commits
commit: baeb01a45cc4855f86e3ae4028b8c94f5a2d5364
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 10 14:03:12 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Jun 10 14:03:12 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=baeb01a4
tests/qmerge: fix vdb path
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
tests/qmerge/dotest | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qmerge/dotest b/tests/qmerge/dotest
index 17187f9..83cb991 100755
--- a/tests/qmerge/dotest
+++ b/tests/qmerge/dotest
@@ -71,7 +71,7 @@ tend $? "qmerge-test: [C] pkg_* order of execution" || printf '%s\n' "${order}"
[[ ! -x ${ROOT}/usr/bin/qmerge-test && \
-f ${ROOT}/etc/some.conf && \
! -f ${ROOT}/etc/another.conf && \
- ! -d ${ROOT}/var/pkg/db/sys-devel ]]
+ ! -d ${ROOT}/var/db/pkg/sys-devel ]]
tend $? "qmerge-test: [C] uninstalled expected files" || treedir "${ROOT}"
set -e
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/portage-utils:master commit in: tests/qmerge/
@ 2020-01-03 11:27 Fabian Groffen
0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2020-01-03 11:27 UTC (permalink / raw
To: gentoo-commits
commit: 61fdfd4d8cc40da77455c6f8b36a3ec36aa5b146
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 3 11:26:49 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Jan 3 11:26:49 2020 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=61fdfd4d
tests/qmerge: add case for INSTALL_MASK
This tests INSTALL_MASK on a simple and a inversed path, with one level
difference.
Bug: https://bugs.gentoo.org/699376
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
tests/qmerge/dotest | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/tests/qmerge/dotest b/tests/qmerge/dotest
index 1563595..23f3ca7 100755
--- a/tests/qmerge/dotest
+++ b/tests/qmerge/dotest
@@ -79,6 +79,32 @@ tend $? "qmerge-test: [C] pkg_* order of execution" || die "$(printf '%s\n' "${o
! -d ${ROOT}/var/db/pkg/sys-devel ]]
tend $? "qmerge-test: [C] uninstalled expected files" || die "$(treedir "${ROOT}")"
+# cleanup
+rm -Rf "${ROOT}"/etc
+
+# check if INSTALL_MASK is applied well
+export INSTALL_MASK="/etc"
+out=$(yes | qmerge -F qmerge-test)
+tend $? "qmerge-test: [M] install no /etc" || die "${out}"
+[[ ! -e ${ROOT}/etc ]]
+tend $? "qmerge-test: [M] found no /etc" || die "$(treedir "${ROOT}")"
+
+out=$(yes | qmerge -FU qmerge-test)
+tend $? "qmerge-test: [M] uninstall" || die "${out}"
+[[ ! -e ${ROOT}/etc ]]
+tend $? "qmerge-test: [M] /etc removed" || die "$(treedir "${ROOT}")"
+
+export INSTALL_MASK="/etc -/etc/some.conf"
+out=$(yes | qmerge -F qmerge-test)
+tend $? "qmerge-test: [M] install only /etc/some.conf" || die "${out}"
+[[ ! -e ${ROOT}/etc/another.conf ]]
+tend $? "qmerge-test: [M] found /etc/another.conf" || die "$(treedir "${ROOT}")"
+
+out=$(yes | qmerge -FU qmerge-test)
+tend $? "qmerge-test: [M] uninstall" || die "${out}"
+[[ ! -e ${ROOT}/etc ]]
+tend $? "qmerge-test: [M] /etc removed" || die "$(treedir "${ROOT}")"
+
set -e
cleantmpdir
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/portage-utils:master commit in: tests/qmerge/
@ 2020-01-03 12:45 Fabian Groffen
0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2020-01-03 12:45 UTC (permalink / raw
To: gentoo-commits
commit: 4d6b231cf0973e1d3b869d98a0e263155f04b20c
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 3 12:43:49 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Jan 3 12:43:49 2020 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=4d6b231c
tests/qmerge: test masking an intermediate level in INSTALL_MASK
this tests the case from the archives:
/usr/foo -/usr/foo/bar /usr/foo/bar/baz
Bug: https://bugs.gentoo.org/699376
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
tests/qmerge/dotest | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/qmerge/dotest b/tests/qmerge/dotest
index 1bbf5f7..208bc3b 100755
--- a/tests/qmerge/dotest
+++ b/tests/qmerge/dotest
@@ -118,6 +118,18 @@ tend $? "qmerge-test: [M] uninstall" || die "${out}"
[[ ! -e ${ROOT}/usr/bin/dummy ]]
tend $? "qmerge-test: [M] /usr/bin/dummy removed" || die "$(treedir "${ROOT}")"
+export INSTALL_MASK="/usr -/usr/bin /usr/bin/dummy"
+out=$(yes | qmerge -F qmerge-test)
+tend $? "qmerge-test: [M] install except /usr/bin/dummy" || die "${out}"
+[[ ! -e ${ROOT}/usr/bin/dummy ]]
+tend $? "qmerge-test: [M] found no /usr/bin/dummy" || die "$(treedir "${ROOT}")"
+[[ -e ${ROOT}/usr/bin/qmerge-test ]]
+tend $? "qmerge-test: [M] found /usr/bin/qmerge-test" || die "$(treedir "${ROOT}")"
+
+out=$(yes | qmerge -FU qmerge-test)
+tend $? "qmerge-test: [M] uninstall" || die "${out}"
+[[ ! -e ${ROOT}/usr/bin/qmerge-test ]]
+tend $? "qmerge-test: [M] /usr/bin/qmerge-test removed" || die "$(treedir "${ROOT}")"
set -e
cleantmpdir
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/portage-utils:master commit in: tests/qmerge/
@ 2020-05-25 10:43 Fabian Groffen
0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2020-05-25 10:43 UTC (permalink / raw
To: gentoo-commits
commit: 1feb7c2887f1e257506a1577cd3f3f4d28e12ace
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon May 25 10:41:15 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon May 25 10:41:15 2020 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=1feb7c28
tests: add qmerge tests for different compression schemes in binpkgs
While we had support for installing various compressed binpkgs, we never
tested this at all. Especially since zstd now became the new standard
Portage uses, it is a good idea to ensure we cope well with this.
This new blob of tests, checks qtbz2, qlist and qmerge to disassemble,
assemble and install binpkgs with all known supported compressors.
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
tests/qmerge/dotest | 36 +++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/tests/qmerge/dotest b/tests/qmerge/dotest
index 208bc3b..59f249d 100755
--- a/tests/qmerge/dotest
+++ b/tests/qmerge/dotest
@@ -130,8 +130,42 @@ out=$(yes | qmerge -FU qmerge-test)
tend $? "qmerge-test: [M] uninstall" || die "${out}"
[[ ! -e ${ROOT}/usr/bin/qmerge-test ]]
tend $? "qmerge-test: [M] /usr/bin/qmerge-test removed" || die "$(treedir "${ROOT}")"
-set -e
+
+# try all compressions we know to see if we handle them properly
+pkgver=qmerge-test-1.3
+rev=0
+mkdir -p pkgs/sys-devel
+qtbz2 -s ${PKGDIR}/sys-devel/${pkgver}.tbz2
+export PKGDIR=${PWD}/pkgs
+bzip2 -dc < ${pkgver}.tar.bz2 > ${pkgver}.tar
+for compr in "" brotli gzip bzip2 xz lz4 zstd lzip lzop ; do
+ if [[ ${compr} != "" ]] ; then
+ cexec=$(type -P ${compr} 2>/dev/null)
+ echo "compressor: ${compr} = ${cexec}"
+ [[ -x ${cexec} ]] || continue
+ f=${pkgver}.tar.${compr}
+ ${cexec} -c < ${pkgver}.tar > ${f}
+ else
+ echo "plain tar"
+ f=${pkgver}.tar
+ fi
+ : $((rev++))
+ qtbz2 -j ${f} ${pkgver}.xpak pkgs/sys-devel/${pkgver}-r${rev}.tbz2
+ ls -l pkgs/sys-devel/${pkgver}-r${rev}.tbz2
+ ROOT=/ qlist -kIv | tee /dev/stderr | wc -l
+
+ # see if we can install this package
+ out=$(yes | qmerge -Fv qmerge-test)
+ tend $? "qmerge-test: [X] install ${pkgver}-r${rev}" || die "${out}"
+ qlist -Iv
+ out=$(yes | qmerge -FU qmerge-test)
+ tend $? "qmerge-test: [X] uninstall ${pkgver}-r${rev}" || die "${out}"
+
+ rm pkgs/sys-devel/${pkgver}-r${rev}.tbz2
+done
cleantmpdir
+set -e
+
end
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-05-25 10:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-10 10:09 [gentoo-commits] proj/portage-utils:master commit in: tests/qmerge/ Fabian Groffen
-- strict thread matches above, loose matches on Subject: below --
2020-05-25 10:43 Fabian Groffen
2020-01-03 12:45 Fabian Groffen
2020-01-03 11:27 Fabian Groffen
2019-06-10 15:29 Fabian Groffen
2019-06-10 12:50 Fabian Groffen
2019-06-10 12:50 Fabian Groffen
2019-05-10 11:52 Fabian Groffen
2016-12-29 2:25 Mike Frysinger
2015-02-24 1:26 Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox