1 |
This attempts to catch autotools-based tests that will pass without |
2 |
actually executing any tests due to automagic-based rules like the |
3 |
presence/absence of a dependency. |
4 |
|
5 |
Bug: https://bugs.gentoo.org/848579 |
6 |
--- |
7 |
metadata/install-qa-check.d/60noop-testsuites | 28 +++++++++++++++++++ |
8 |
1 file changed, 28 insertions(+) |
9 |
create mode 100644 metadata/install-qa-check.d/60noop-testsuites |
10 |
|
11 |
diff --git a/metadata/install-qa-check.d/60noop-testsuites |
12 |
b/metadata/install-qa-check.d/60noop-testsuites |
13 |
new file mode 100644 |
14 |
index 0000000000..82e3de6b7e |
15 |
--- /dev/null |
16 |
+++ b/metadata/install-qa-check.d/60noop-testsuites |
17 |
@@ -0,0 +1,28 @@ |
18 |
+# Copyright 2021-2022 Gentoo Authors |
19 |
+# Distributed under the terms of the GNU General Public License v2 |
20 |
+ |
21 |
+# QA check: look for autotools-based tests are actually no-ops |
22 |
+# Maintainer: Quality Assurance team <qa@g.o> |
23 |
+ |
24 |
+noop_testsuite_check() { |
25 |
+ use test || return |
26 |
+ |
27 |
+ IFS= readarray -t noop_testsuites < <(find "${S}" -type f -name |
28 |
'test-suite.log' -print0 | xargs -0 grep -l "TOTAL: 0" 2>/dev/null) |
29 |
+ |
30 |
+ if [[ -n ${noop_testsuites[@]} ]]; then |
31 |
+ eqawarn "QA Notice: Test suite passed but did not actually |
32 |
execute any tests:" |
33 |
+ eqawarn |
34 |
+ for suite in ${noop_testsuites[@]} |
35 |
+ do |
36 |
+ # can't use eqatag here because filenames must be relative |
37 |
to ${D}, |
38 |
+ # but our test suite log files only exist in ${S} |
39 |
+ eqawarn "\t${suite#${S}/}" |
40 |
+ done |
41 |
+ eqawarn |
42 |
+ fi |
43 |
+} |
44 |
+ |
45 |
+noop_testsuite_check |
46 |
+: # guarantee successful exit |
47 |
+ |
48 |
+# vim:ft=sh |
49 |
-- |
50 |
2.35.1 |