Signed-off-by: Michał Górny <
mgorny@gentoo.org>
---
eclass/tests/llvm-r2.sh | 101 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 101 insertions(+)
create mode 100755 eclass/tests/llvm-r2.sh
diff --git a/eclass/tests/llvm-r2.sh b/eclass/tests/llvm-r2.sh
new file mode 100755
index 000000000000..e715f7e34e82
--- /dev/null
+++ b/eclass/tests/llvm-r2.sh
@@ -0,0 +1,101 @@
+#!/bin/bash
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+source tests-common.sh || exit
+
+EAPI=8
+
+test_globals() {
+ local compat=${1}
+ local expected_iuse=${2}
+ local expected_required_use=${3}
+ local expected_usedep=${4}
+ local x
+
+ tbegin "LLVM_COMPAT=( ${compat} )"
+
+ (
+ local fail=0
+ local LLVM_COMPAT=( ${compat} )
+
+ inherit llvm-r2
+
+ if [[ ${IUSE%% } != ${expected_iuse} ]]; then
+ eerror " IUSE: ${IUSE%% }"
+ eerror "does not match: ${expected_iuse}"
+ fail=1
+ fi
+
+ if [[ ${REQUIRED_USE} != ${expected_required_use} ]]; then
+ eerror "