ostree: Add support for ptest
PATCH v3 1/2 ostree: Add support for ptest
Move ostree-trivial-httpd to its own package so we can RDEPEND on it in both the main ostree and ptest packages. Drop the patches to remove ostree-trivial-httpd based on --enable-trivial-httpd-cmdline as they break installed tests (and were reverted upstream).
---
Changes in v3:
- add patch to ensure tests/ is created
Changes in v2:
- include ptest changes against 2019.4 so can we remove the BUILDOPT_TRIVIAL_HTTPD changes before upgrading to 2019.5 as they were reverted upstream
...lways-enable-trivial-httpd-for-tests.patch | 59 ------------------- ...ate-tests-directory-for-split-builds.patch | 43 ++++++++++++++ ...-EPIPE-failures-when-head-terminates.patch | 51 ++++++++++++++++ ...-core-Fallback-to-en_US.UTF-8-locale.patch | 42 +++++++++++++ ...vial-httpd-on-BUILDOPT_TRIVIAL_HTTPD.patch | 51 ---------------- ...Assume-C.UTF-8-if-locale-isn-t-found.patch | 40 +++++++++++++ ...3-tests-Avoid-musl-failure-with-cp-a.patch | 52 ++++++++++++++++ .../recipes-extended/ostree/ostree/run-ptest | 3 + .../recipes-extended/ostree/ostree_2019.4.bb | 45 ++++++++++++-- 9 files changed, 271 insertions(+), 115 deletions(-) delete mode 100644 meta-oe/recipes-extended/ostree/ostree/0001-Always-enable-trivial-httpd-for-tests.patch create mode 100644 meta-oe/recipes-extended/ostree/ostree/0001-build-create-tests-directory-for-split-builds.patch create mode 100644 meta-oe/recipes-extended/ostree/ostree/0001-tests-Handle-EPIPE-failures-when-head-terminates.patch create mode 100644 meta-oe/recipes-extended/ostree/ostree/0001-tests-core-Fallback-to-en_US.UTF-8-locale.patch delete mode 100644 meta-oe/recipes-extended/ostree/ostree/0002-Gate-ostree-trivial-httpd-on-BUILDOPT_TRIVIAL_HTTPD.patch create mode 100644 meta-oe/recipes-extended/ostree/ostree/0002-tests-core-Assume-C.UTF-8-if-locale-isn-t-found.patch create mode 100644 meta-oe/recipes-extended/ostree/ostree/0003-tests-Avoid-musl-failure-with-cp-a.patch create mode 100644 meta-oe/recipes-extended/ostree/ostree/run-ptest
meta-oe/recipes-extended/ostree/ostree/0001-Always-enable-trivial-httpd-for-tests.patch deleted +0 -59
@@ -1,59 +0,0 @@ -From 44e0647230b22cd136ae2fb252ce90eed4751970 Mon Sep 17 00:00:00 2001 -From: Alex Kiernan <[email protected]> -Date: Wed, 4 Sep 2019 17:29:15 +0100 -Subject: [PATCH 1/2] Always enable trivial-httpd for tests - -When running tests we always need ostree-trivial-httpd, so enable it -unconditionally - -Signed-off-by: Alex Kiernan <[email protected]> -Upstream-Status: Submitted [https://github.com/ostreedev/ostree/pull/1912] ---- - Makefile.am | 1 + - ci/build.sh | 5 +++++ - ci/travis-build.sh | 1 + - 3 files changed, 7 insertions(+) - -diff --git a/Makefile.am b/Makefile.am -index cd04a055045a..673dbf88de55 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -39,6 +39,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS += \ - --enable-gtk-doc \ - --enable-man \ - --disable-maintainer-mode \ -+ --enable-trivial-httpd-cmdline \ - $(NULL) - - GITIGNOREFILES = aclocal.m4 build-aux/ buildutil/*.m4 config.h.in gtk-doc.make -diff --git a/ci/build.sh b/ci/build.sh -index 0901507498f2..806af050b780 100755 ---- a/ci/build.sh -+++ b/ci/build.sh -@@ -22,6 +22,11 @@ case "${CONFIGOPTS:-}" in - fi - ;; - esac -+# unless libsoup is disabled, enable trivial-httpd for the tests -+case "${CONFIGOPTS:-}" in -+ *--without-soup*) ;; -+ *) CONFIGOPTS="${CONFIGOPTS:-} --enable-trivial-httpd-cmdline" ;; -+esac - - # always fail on warnings; https://github.com/ostreedev/ostree/pull/971 - # NB: this disables the default set of flags from configure.ac -diff --git a/ci/travis-build.sh b/ci/travis-build.sh -index 3fd969bdced6..7c85313a2d32 100755 ---- a/ci/travis-build.sh -+++ b/ci/travis-build.sh -@@ -85,6 +85,7 @@ make="make -j${ci_parallel} V=1 VERBOSE=1" - - ../configure \ - --enable-always-build-tests \ -+ --enable-trivial-httpd-cmdline \ - ${ci_configopts} - "$@" - --- -2.17.1 -
meta-oe/recipes-extended/ostree/ostree/0001-build-create-tests-directory-for-split-builds.patch new file +43 -0
43 lines not on this page · raw message
meta-oe/recipes-extended/ostree/ostree/0001-tests-Handle-EPIPE-failures-when-head-terminates.patch new file +51 -0
51 lines not on this page · raw message
meta-oe/recipes-extended/ostree/ostree/0001-tests-core-Fallback-to-en_US.UTF-8-locale.patch new file +42 -0
42 lines not on this page · raw message
meta-oe/recipes-extended/ostree/ostree/0002-Gate-ostree-trivial-httpd-on-BUILDOPT_TRIVIAL_HTTPD.patch deleted +0 -51
51 lines not on this page · raw message
meta-oe/recipes-extended/ostree/ostree/0002-tests-core-Assume-C.UTF-8-if-locale-isn-t-found.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 3d48021fb0892721fab8359b49470e521aaed493 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <[email protected]> +Date: Thu, 31 Oct 2019 11:28:07 +0000 +Subject: [PATCH 2/3] tests/core: Assume C.UTF-8 if locale isn't found + +When building with musl there's no locale command, also its default +locale is C.UTF-8, so just get C.UTF-8 if we can't find locale. + +Signed-off-by: Alex Kiernan <[email protected]> +Upstream-Status: Accepted [v2019.6] +--- + tests/libtest-core.sh | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/tests/libtest-core.sh b/tests/libtest-core.sh +index bc191332c916..46aafab03cc8 100644 +--- a/tests/libtest-core.sh ++++ b/tests/libtest-core.sh +@@ -37,9 +37,15 @@ assert_not_reached () { + # Some tests look for specific English strings. Use a UTF-8 version + # of the C (POSIX) locale if we have one, or fall back to en_US.UTF-8 + # (https://sourceware.org/glibc/wiki/Proposals/C.UTF-8) +-export LC_ALL=$(locale -a | grep -Ee '\.(UTF-8|utf8)' | grep -iEe '^(C|en_US)' | head -1 || true) +-if [ -z "${LC_ALL}" ]; then fatal "Can't find suitable UTF-8 locale"; fi +- ++# ++# If we can't find the locale command assume we have support for C.UTF-8 ++# (e.g. musl based systems) ++if type -p locale >/dev/null; then ++ export LC_ALL=$(locale -a | grep -Ee '\.(UTF-8|utf8)' | grep -iEe '^(C|en_US)' | head -1 || true) ++ if [ -z "${LC_ALL}" ]; then fatal "Can't find suitable UTF-8 locale"; fi ++else ++ export LC_ALL=C.UTF-8 ++fi + # A GNU extension, used whenever LC_ALL is not C + unset LANGUAGE + +-- +2.17.1 +
meta-oe/recipes-extended/ostree/ostree/0003-tests-Avoid-musl-failure-with-cp-a.patch new file +52 -0
52 lines not on this page · raw message
meta-oe/recipes-extended/ostree/ostree/run-ptest new file +3 -0
@@ -0,0 +1,3 @@ +#! /bin/sh + +gnome-desktop-testing-runner libostree
meta-oe/recipes-extended/ostree/ostree_2019.4.bb +40 -5
87 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 2/2 ostree: Upgrade 2019.4 -> 2019.5
---
Changes in v3: None
Changes in v2: None
.../ostree/{ostree_2019.4.bb => ostree_2019.5.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-oe/recipes-extended/ostree/{ostree_2019.4.bb => ostree_2019.5.bb} (99%)meta-oe/recipes-extended/ostree/ostree_2019.5.bb renamed from meta-oe/recipes-extended/ostree/ostree_2019.4.bb +1 -1
@@ -32,7 +32,7 @@ SRC_URI = " \ file://0003-tests-Avoid-musl-failure-with-cp-a.patch \ file://0001-build-create-tests-directory-for-split-builds.patch \ " -SRCREV = "9d39e7d91e8497987cad69a3fbed5c5fc91eebdc" +SRCREV = "980ca07b03b3aa7e0012729dd6c84b0878775d93" UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+)"
Signature · 1 line
2.17.1