From d2bcdab82e5f5f38a8ab54026e8aa94edb1b77a6 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 21 Dec 2024 06:30:52 +0000 Subject: gentoo auto-resync : 21:12:2024 - 06:30:51 --- eclass/tests/llvm-r1.sh | 68 ++++--------------------------------------------- 1 file changed, 5 insertions(+), 63 deletions(-) (limited to 'eclass/tests') diff --git a/eclass/tests/llvm-r1.sh b/eclass/tests/llvm-r1.sh index 892b773a08c9..730b0a6db653 100755 --- a/eclass/tests/llvm-r1.sh +++ b/eclass/tests/llvm-r1.sh @@ -63,67 +63,9 @@ test_gen_dep() { tend ${?} } -test_fix_clang_version() { - local var=${1} - local tool=${2} - local version=${3} - local expected=${4} - - eval "${tool}() { - cat <<-EOF - clang version ${version} - Target: x86_64-pc-linux-gnu - Thread model: posix - InstalledDir: /usr/lib/llvm/17/bin - Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg - EOF - }" - - declare -g ${var}=${tool} - tbegin "llvm_fix_clang_version ${var}=${tool} for ${version}" - llvm_fix_clang_version "${var}" - if [[ ${!var} != ${expected} ]]; then - eerror "llvm_fix_clang_version ${var}" - eerror " gave: ${!var}" - eerror "expected: ${expected}" - fi - tend ${?} -} - -test_fix_tool_path() { - local var=${1} - local tool=${2} - local expected_subst=${3} - local expected=${tool} - - tbegin "llvm_fix_tool_path ${1}=${2} (from llvm? ${expected_subst})" - - local matches=( "${BROOT}"/usr/lib/llvm/*/bin/"${tool}" ) - if [[ ${expected_subst} == 1 ]]; then - if [[ ! -x ${matches[0]} ]]; then - ewarn "- skipping, test requires ${tool}" - return - fi - - expected=${matches[0]} - local -x PATH=${matches[0]%/*} - else - local -x PATH= - fi - - declare -g ${var}=${tool} - llvm_fix_tool_path "${var}" - if [[ ${!var} != ${expected} ]]; then - eerror "llvm_fix_tool_path ${var}" - eerror " gave: ${!var}" - eerror "expected: ${expected}" - fi - tend ${?} -} - # full range test_globals '14 15 16 17 18 19' \ - "+llvm_slot_18 llvm_slot_15 llvm_slot_16 llvm_slot_17 llvm_slot_19" \ + "+llvm_slot_19 llvm_slot_15 llvm_slot_16 llvm_slot_17 llvm_slot_18" \ "^^ ( llvm_slot_15 llvm_slot_16 llvm_slot_17 llvm_slot_18 llvm_slot_19 )" \ "llvm_slot_15(-)?,llvm_slot_16(-)?,llvm_slot_17(-)?,llvm_slot_18(-)?,llvm_slot_19(-)?" test_globals '14 15 16 17 18' \ @@ -136,10 +78,10 @@ test_globals '14 15 16' \ "^^ ( llvm_slot_15 llvm_slot_16 )" \ "llvm_slot_15(-)?,llvm_slot_16(-)?" # old + newer than current stable -test_globals '15 19' \ - "+llvm_slot_15 llvm_slot_19" \ - "^^ ( llvm_slot_15 llvm_slot_19 )" \ - "llvm_slot_15(-)?,llvm_slot_19(-)?" +test_globals '15 20' \ + "+llvm_slot_15 llvm_slot_20" \ + "^^ ( llvm_slot_15 llvm_slot_20 )" \ + "llvm_slot_15(-)?,llvm_slot_20(-)?" # newer than current stable test_globals '19' \ "+llvm_slot_19" \ -- cgit v1.2.3