commit:     72a4afc1514c41c157665166526fb36257eed860
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 12 06:31:30 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 12 06:33:03 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72a4afc1

eclass/tests: fix flag-o-matic tests w/ clang

The eclass behaviour was fixed in ddba1d149e82dba88b72f992729ad4158f640e32.

Bug: https://bugs.gentoo.org/627474
Bug: https://bugs.gentoo.org/712488
Bug: https://bugs.gentoo.org/714742
Bug: https://bugs.gentoo.org/862798
Closes: https://bugs.gentoo.org/934129
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/tests/flag-o-matic.sh | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/eclass/tests/flag-o-matic.sh b/eclass/tests/flag-o-matic.sh
index 1e4bfdb2fcfe..4dc133776038 100755
--- a/eclass/tests/flag-o-matic.sh
+++ b/eclass/tests/flag-o-matic.sh
@@ -1,7 +1,6 @@
 #!/bin/bash
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
-
 source tests-common.sh || exit
 
 EAPI=7
@@ -153,25 +152,25 @@ out=$(test-flags-CC -finvalid-flag)
 ftend
 
 if type -P clang >/dev/null ; then
-tbegin "test-flags-CC (valid flags w/clang)"
-out=$(CC=clang test-flags-CC -O3)
-[[ $? -eq 0 && ${out} == "-O3" ]]
-ftend
+       tbegin "test-flags-CC (valid flags w/clang)"
+       out=$(CC=clang test-flags-CC -O3)
+       [[ $? -eq 0 && ${out} == "-O3" ]]
+       ftend
 
-tbegin "test-flags-CC (invalid flags w/clang)"
-out=$(CC=clang test-flags-CC -finvalid-flag)
-[[ $? -ne 0 && -z ${out} ]]
-ftend
+       tbegin "test-flags-CC (invalid flags w/clang)"
+       out=$(CC=clang test-flags-CC -finvalid-flag)
+       [[ $? -ne 0 && -z ${out} ]]
+       ftend
 
-tbegin "test-flags-CC (gcc-valid but clang-invalid flags)"
-out=$(CC=clang test-flags-CC -finline-limit=1200)
-[[ $? -ne 0 && -z ${out} ]]
-ftend
+       tbegin "test-flags-CC (gcc-valid but clang-invalid flags)"
+       out=$(CC=clang test-flags-CC -finline-limit=1200)
+       [[ $? -ne 0 && -z ${out} ]]
+       ftend
 
-tbegin "test-flags-CC (unused flags w/clang)"
-out=$(CC=clang test-flags-CC -Wl,-O1)
-[[ $? -eq 0 && ${out} == "-Wl,-O1" ]]
-ftend
+       tbegin "test-flags-CC (unused flags w/clang)"
+       out=$(CC=clang test-flags-CC -Wl,-O1)
+       [[ $? -ne 0 && -z ${out} ]]
+       ftend
 fi
 
 texit

Reply via email to