summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatoro <matoro@users.noreply.github.com>2022-07-05 14:28:32 -0400
committerSam James <sam@gentoo.org>2022-08-21 03:30:00 +0100
commit81d57dd71121fabff702a84951b339679240ebeb (patch)
treeadb77eca0224ade1c9a2374186e34d0a0dc2a261 /metadata
parentdev-lang/ghc: add big-endian ppc64 binary (diff)
downloadgentoo-81d57dd71121fabff702a84951b339679240ebeb.tar.gz
gentoo-81d57dd71121fabff702a84951b339679240ebeb.tar.bz2
gentoo-81d57dd71121fabff702a84951b339679240ebeb.zip
metadata/install-qa-check.d: add 60noop-testsuites
This attempts to catch autotools-based tests that will pass without actually executing any tests due to automagic-based rules like the presence/absence of a dependency. (sam: This was written based on my notes for implementation.) Bug: https://bugs.gentoo.org/848579 Closes: https://github.com/gentoo/gentoo/pull/26237 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'metadata')
-rw-r--r--metadata/install-qa-check.d/60noop-testsuites28
1 files changed, 28 insertions, 0 deletions
diff --git a/metadata/install-qa-check.d/60noop-testsuites b/metadata/install-qa-check.d/60noop-testsuites
new file mode 100644
index 000000000000..82e3de6b7ed3
--- /dev/null
+++ b/metadata/install-qa-check.d/60noop-testsuites
@@ -0,0 +1,28 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# QA check: look for autotools-based tests are actually no-ops
+# Maintainer: Quality Assurance team <qa@gentoo.org>
+
+noop_testsuite_check() {
+ use test || return
+
+ IFS= readarray -t noop_testsuites < <(find "${S}" -type f -name 'test-suite.log' -print0 | xargs -0 grep -l "TOTAL: 0" 2>/dev/null)
+
+ if [[ -n ${noop_testsuites[@]} ]]; then
+ eqawarn "QA Notice: Test suite passed but did not actually execute any tests:"
+ eqawarn
+ for suite in ${noop_testsuites[@]}
+ do
+ # can't use eqatag here because filenames must be relative to ${D},
+ # but our test suite log files only exist in ${S}
+ eqawarn "\t${suite#${S}/}"
+ done
+ eqawarn
+ fi
+}
+
+noop_testsuite_check
+: # guarantee successful exit
+
+# vim:ft=sh