diff --git a/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/run-ptest b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/run-ptest index 2d5bdf4ff2..c6ce411029 100644 --- a/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/run-ptest +++ b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl/run-ptest @@ -1,4 +1,14 @@ #!/bin/sh -gsl_tests && echo "PASS: gsl_tests" || echo "FAIL: gsl_tests" -gsl_noexcept_tests && echo "PASS: gsl_noexcept_tests" || echo "FAIL: gsl_noexcept_tests" +# Upstream builds one executable per tests/*.cpp source, so iterate rather +# than naming them individually. +cd "$(dirname "$0")" || exit 1 + +for t in *_tests; do + [ -x "./$t" ] || continue + if "./$t"; then + echo "PASS: $t" + else + echo "FAIL: $t" + fi +done diff --git a/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.2.2.bb b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_5.0.0.bb similarity index 75% rename from meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.2.2.bb rename to meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_5.0.0.bb index 3d795878b2..1521ed1111 100644 --- a/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.2.2.bb +++ b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_5.0.0.bb @@ -8,10 +8,10 @@ HOMEPAGE = "https://github.com/microsoft/GSL" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=363055e71e77071107ba2bb9a54bd9a7" -SRC_URI = "git://github.com/microsoft/GSL.git;protocol=https;branch=rel/4.2;tag=v${PV} \ +SRC_URI = "git://github.com/microsoft/GSL.git;protocol=https;branch=rel/5.0;tag=v${PV} \ file://run-ptest \ " -SRCREV = "152d6eb989a1ecd23fe9c9cfb2fb8cfc7c0cd0c1" +SRCREV = "417ef685eafd626db765f0027b7fc5a0057e0770" inherit cmake pkgconfig ptest @@ -24,18 +24,22 @@ PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'ptest','', d)}" PACKAGECONFIG[ptest] = "-DGSL_TEST=ON,-DGSL_TEST=OFF,googletest" # clang disagrees with https://github.com/google/googletest/pull/3457 -CXXFLAGS:append:toolchain-clang = " -Wno-error=switch-default" +# The tests are built with -Weverything -Werror, so each clang release turns +# its new diagnostics into build failures. +CXXFLAGS:append:toolchain-clang = "\ + -Wno-error=switch-default \ + -Wno-unknown-warning-option \ + -Wno-error=lifetime-safety-intra-tu-suggestions \ + -Wno-error=lifetime-safety-intra-tu-constructor-suggestions \ +" # Disable disabled-macro-expansion warning as error as its seen on musl CXXFLAGS:append:toolchain-clang:libc-musl = " -Wno-error=disabled-macro-expansion" do_install_ptest() { - install -d ${D}${bindir} - install -m 0755 ${B}/tests/gsl_tests ${D}${bindir} - install -m 0755 ${B}/tests/gsl_noexcept_tests ${D}${bindir} + install -d ${D}${PTEST_PATH} + install -m 0755 ${B}/tests/*_tests ${D}${PTEST_PATH} } -FILES:${PN}-ptest = "${bindir}/gsl*_tests" - # there is already other gsl recipe, so recipe name does not match the real component name CVE_PRODUCT = "microsoft:gsl"