ostree: fix ptests
PATCH 1/1 ostree: fix ptests
1. Fix tests that output colored text but try to verify uncolored text - filter the output through "tee" to remove coloring.
2. Add missing dependency
3. Fix a test that fails when C.utf-8 locale is not available on the machine (patch submitted upstream)
4. Enable network connection by setting a nameserver in resolv.conf
While execution is possible, it still requires both ostree and busybox to be compiled statically.
Signed-off-by Gyorgy Sarvari <[email protected]>
--- .../recipes-extended/ostree/ostree/run-ptest | 13 ++- ...locales-in-remote-gpg-list-keys-test.patch | 102 ++++++++++++++++++ .../recipes-extended/ostree/ostree_2021.6.bb | 2 + 3 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/ostree/ostree/tests-account-for-different-locales-in-remote-gpg-list-keys-test.patch
meta-oe/recipes-extended/ostree/ostree/run-ptest +12 -1
@@ -1,3 +1,14 @@ #! /bin/sh -gnome-desktop-testing-runner libostree +if ! nslookup openpgpkey.test.com; then + mv /etc/resolv.conf /etc/resolv.conf.bak + echo "nameserver 8.8.8.8" > /etc/resolv.conf + trap "mv /etc/resolv.conf.bak /etc/resolv.conf" INT EXIT +fi + +# The tests use terminal colors when the output is a tty. This is a problem, because the tests +# check the output of some commands, which might be colored - and the regex used for matching does not +# account for the colors. This seemingly useless tee is here to get rid of the colors. (The application +# doesn't respect the NO_COLOR envvar and doesn't seem to have other options to disable coloring) + +gnome-desktop-testing-runner libostree | tee
meta-oe/recipes-extended/ostree/ostree/tests-account-for-different-locales-in-remote-gpg-list-keys-test.patch new file +102 -0
102 lines not on this page · raw message
meta-oe/recipes-extended/ostree/ostree_2021.6.bb +2 -0
@@ -19,6 +19,7 @@ DEPENDS = " \ SRC_URI = " \ gitsm://github.com/ostreedev/ostree;branch=main;protocol=https \ + file://tests-account-for-different-locales-in-remote-gpg-list-keys-test.patch \ file://run-ptest \ " SRCREV = "f1155c8d283c3c85d74d5e1050b0dcf8198f750a"
@@ -196,6 +197,7 @@ RDEPENDS:${PN}-ptest += " \ util-linux \ xz \ ${PN}-trivial-httpd \ + ${PN}-switchroot \ python3-pyyaml \ ${@bb.utils.contains('PACKAGECONFIG', 'gjs', 'gjs', '', d)} \ "