• [gentoo-dev] [PATCH 11/11] eclass/tests/llvm-r2.sh: Add tests for llvm-

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Sat Dec 21 17:10:02 2024
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/tests/llvm-r2.sh | 87 +++++++++++++++++++++++++++++++++++++++++
    1 file changed, 87 insertions(+)

    diff --git a/eclass/tests/llvm-r2.sh b/eclass/tests/llvm-r2.sh
    index e715f7e34e82..fde76d2d682e 100755
    --- a/eclass/tests/llvm-r2.sh
    +++ b/eclass/tests/llvm-r2.sh
    @@ -63,6 +63,80 @@ test_gen_dep() {
    tend ${?}
    }

    +LLVM_CONFIG_OPTIONS=(
    + --assertion-mode
    + --bindir
    + --build-mode
    + --build-system
    + --cflags
    + --cmakedir
    + --components
    + --cppflags
    + --cxxflags
    + --has-rtti
    + --host-target
    + --ignore-libllvm
    + --includedir
    + --ldflags
    + --libdir
    + --libfiles
    + --libnames
    + --libs
    + --link-shared
    + --link-static
    + --obj-root
    + --prefix
    + --shared-mode
    + --system-libs
    + --targets-built
    + --version
    +)
    +
    +normalize_list() {
    + "${@}" |
    + sed -e 's:\s\+:\n:g' |
    + sed -e '/^$/d' |
    + sort
    + local ps=${PIPESTATUS[*]}
    + [[ ${ps} == '0 0 0 0' ]] || die "normalize_list pipe failed: ${ps}"
    +}
    +
    +test_llvm_config() {
    + einfo "llvm-config for slot ${LLVM_SLOT},