diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2018-12-20 01:59:54 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2018-12-20 02:06:31 +0100 |
commit | 6bfd73a8952c21351d8d061a5ae82bda24d00205 (patch) | |
tree | bd8b74e3f293ce135deaa341a2d9c0c170d620c2 /media-libs/openjpeg | |
parent | dev-db/percona-server: bump to v5.7.24-27 (diff) | |
download | gentoo-6bfd73a8952c21351d8d061a5ae82bda24d00205.tar.gz gentoo-6bfd73a8952c21351d8d061a5ae82bda24d00205.tar.bz2 gentoo-6bfd73a8952c21351d8d061a5ae82bda24d00205.zip |
media-libs/openjpeg: check against known architecture specific failures
Bug: https://bugs.gentoo.org/628430
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'media-libs/openjpeg')
-rw-r--r-- | media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild | 65 |
1 files changed, 42 insertions, 23 deletions
diff --git a/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild b/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild index 8d15446c08e0..d707632ac091 100644 --- a/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild +++ b/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild @@ -74,39 +74,58 @@ multilib_src_test() { popd > /dev/null || die return 0 else + local FAILEDTEST_LOG="${BUILD_DIR}/Testing/Temporary/LastTestsFailed.log" + + if [[ ! -f "${FAILEDTEST_LOG}" ]] ; then + # Should never happen + die "Cannot analyze test failures: LastTestsFailed.log is missing!" + fi + echo "" einfo "Note: Upstream is maintaining a list of known test failures." einfo "We will now compare our test results against this list and sort out any known failure." - local KNOWN_FAILURES_LIST="${S}/tools/travis-ci/knownfailures-all.txt" - local FAILEDTEST_LOG="${BUILD_DIR}/Testing/Temporary/LastTestsFailed.log" - local FAILURES_LOG="${BUILD_DIR}/Testing/Temporary/failures.txt" + local KNOWN_FAILURES_LIST="${T}/known_failures_compiled.txt" + cat "${S}/tools/travis-ci/knownfailures-all.txt" > "${KNOWN_FAILURES_LIST}" || die + + local ARCH_SPECIFIC_FAILURES= + if use amd64 ; then + ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*x86_64*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')" + elif use x86 || use arm || use arm64; then + ARCH_SPECIFIC_FAILURES="$(find "${S}/tools/travis-ci/" -name 'knownfailures-*i386*.txt' -print0 | sort -z | tail -z -n 1 | tr -d '\0')" + fi + + if [[ -f "${ARCH_SPECIFIC_FAILURES}" ]] ; then + einfo "Adding architecture specific failures (${ARCH_SPECIFIC_FAILURES}) to known failures list ..." + cat "${ARCH_SPECIFIC_FAILURES}" >> "${KNOWN_FAILURES_LIST}" || die + fi + + # Logic copied from $S/tools/travis-ci/run.sh local FAILEDTEST= + local FAILURES_LOG="${BUILD_DIR}/Testing/Temporary/failures.txt" local HAS_UNKNOWN_TEST_FAILURES=0 - if [[ -f "${KNOWN_FAILURES_LIST}" && -f "${FAILEDTEST_LOG}" ]]; then - # Logic copied from $S/tools/travis-ci/run.sh - echo "" + echo "" - awk -F: '{ print $2 }' "${FAILEDTEST_LOG}" > "${FAILURES_LOG}" - while read FAILEDTEST; do - # Common errors - if grep -x "${FAILEDTEST}" "${S}/tools/travis-ci/knownfailures-all.txt" > /dev/null; then - ewarn "Test '${FAILEDTEST}' is known to fail, ignoring ..." - continue - fi - eerror "New/unknown test failure found: '${FAILEDTEST}'" - HAS_UNKNOWN_TEST_FAILURES=1 - done < "${FAILURES_LOG}" - - if [[ ${HAS_UNKNOWN_TEST_FAILURES} -ne 0 ]]; then - die "Test suite failed. New/unknown test failure(s) found!" - else - echo "" - einfo "Test suite passed. No new/unknown test failure(s) found!" + awk -F: '{ print $2 }' "${FAILEDTEST_LOG}" > "${FAILURES_LOG}" + while read FAILEDTEST; do + # is this failure known? + if grep -x "${FAILEDTEST}" "${KNOWN_FAILURES_LIST}" > /dev/null; then + ewarn "Test '${FAILEDTEST}' is known to fail, ignoring ..." + continue fi - return 0 + eerror "New/unknown test failure found: '${FAILEDTEST}'" + HAS_UNKNOWN_TEST_FAILURES=1 + done < "${FAILURES_LOG}" + + if [[ ${HAS_UNKNOWN_TEST_FAILURES} -ne 0 ]]; then + die "Test suite failed. New/unknown test failure(s) found!" + else + echo "" + einfo "Test suite passed. No new/unknown test failure(s) found!" fi + + return 0 fi } |