Blame libomp/runtest.sh

ac62af3
#!/bin/bash
ac62af3
ac62af3
set -exo pipefail
ac62af3
5a94d66
CLANG_VERSION=$(rpm --queryformat="%{version}" -q clang.$(uname -m))
24ce28a
LIBOMP_DEPENDENCIES="libomp libomp-devel"
24ce28a
24ce28a
# Ensure clang depends on the correct clang-libs version
24ce28a
rpm -q --requires clang | grep "clang-libs.* = ${CLANG_VERSION}"
24ce28a
24ce28a
# Check that weak dependencies are correct. The versions of these should be the same
24ce28a
# as clang's to guarantee the ABI compatibility, and that version should be actually
24ce28a
# installed as well.
24ce28a
for lomp_dep in $LIBOMP_DEPENDENCIES; do
24ce28a
    rpm -q --recommends clang-libs | grep "${lomp_dep}.* = ${CLANG_VERSION}"
5a94d66
    [[ "$(rpm --queryformat="%{version}" -q ${lomp_dep}.$(uname -m))" == "${CLANG_VERSION}" ]]
24ce28a
done
24ce28a
24ce28a
# Perform a sanity test to ensure everything works as expected
ac62af3
clang -fopenmp openmp-compile-link-test.c
ac62af3
ac62af3
./a.out | grep "Num Threads: 1"