tstellar / rpms / llvm

Forked from rpms/llvm 5 years ago
Clone
530205e
# TODO(kkleine): Instead of deleting test files we should mark them as expected
530205e
# to fail. See https://llvm.org/docs/CommandGuide/lit.html#cmdoption-lit-xfail
530205e
530205e
# Disable check section on arm due to some kind of memory related failure.
530205e
# Possibly related to https://bugzilla.redhat.com/show_bug.cgi?id=1920183
530205e
%ifnarch %{arm}
530205e
530205e
# TODO: Fix the failures below
530205e
%ifarch %{arm}
530205e
rm llvm/test/tools/llvm-readobj/ELF/dependent-libraries.test
530205e
%endif
530205e
%ifarch ppc64le
530205e
# TODO: Re-enable when ld.gold fixed its internal error.
530205e
rm llvm/test/tools/gold/PowerPC/mtriple.ll
530205e
%endif
530205e
530205e
# non reproducible errors
530205e
# TODO(kkleine): Add this to XFAIL instead?
530205e
rm llvm/test/tools/dsymutil/X86/swift-interface.test
530205e
530205e
%if %{with check}
530205e
530205e
# See https://llvm.org/docs/CommandGuide/lit.html#cmdoption-lit-xfail
530205e
export LIT_XFAIL=""
530205e
a503825
# See https://llvm.org/docs/CommandGuide/lit.html#cmdoption-lit-filter-out
a503825
# Unfortunately LIT_FILTER_OUT is not accepting a list but a regular expression.
a503825
# To make this easily maintainable, we'll create an associate array in bash,
a503825
# to which you can append and later we'll join that array and escpate dots (".")
a503825
# in your test paths.
a503825
declare -a filter_out_tests
a503825
530205e
#region LLVM xfail tests 
530205e
530205e
# Xfail testing of update utility tools
530205e
# LLVM :: 
530205e
export LIT_XFAIL="$LIT_XFAIL;tools/UpdateTestChecks"
530205e
530205e
#endregion
530205e
530205e
#region CLANG xfail tests
530205e
530205e
# Clang :: 
530205e
export LIT_XFAIL="$LIT_XFAIL;clang/test/CodeGen/profile-filter.c"
530205e
530205e
#endregion
530205e
530205e
#region OPENMP xfail tests
530205e
530205e
# TODO(kkleine): OpenMP tests are currently not run on rawhide (see https://bugzilla.redhat.com/show_bug.cgi?id=2252966):
530205e
#
530205e
# + /usr/bin/cmake --build redhat-linux-build -j6 --verbose --target check-openmp
530205e
# Change Dir: '/builddir/build/BUILD/openmp-17.0.6.src/redhat-linux-build'
530205e
# Run Build Command(s): /usr/bin/ninja-build -v -j 6 check-openmp
530205e
# [1/1] cd /builddir/build/BUILD/openmp-17.0.6.src/redhat-linux-build && /usr/bin/cmake -E echo check-openmp\ does\ nothing,\ dependencies\ not\ found.
530205e
# 
530205e
# We're marking the tests that are failing with the follwing error as expected to fail (XFAIL):
530205e
#
530205e
#   gdb.error: No symbol "ompd_sizeof____kmp_gtid" in current context
530205e
#
530205e
# NOTE: It could be a different symbol in some tests.
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_curr_task_handle.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_enclosing_parallel_handle.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_generating_task_handle.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_icv_from_scope.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_scheduling_task_handle.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_state.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_task_frame.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_task_function.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_task_in_parallel.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_task_parallel_handle.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_thread_id.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_thread_in_parallel.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_parallel_handle_compare.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_rel_parallel_handle.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_rel_task_handle.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_rel_thread_handle.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_task_handle_compare.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_thread_handle_compare.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;openmp_examples/ompd_icvs.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_curr_parallel_handle.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_display_control_vars.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api_tests/test_ompd_get_thread_handle.c"
530205e
a503825
# The following test is flaky and we'll filter it out
a503825
filter_out_tests+=("libomp :: ompt/teams/distribute_dispatch.c")
530205e
73138a3
# The following tests seem pass on ppc64le and x86_64 and aarch64 only:
73138a3
%ifnarch ppc64le x86_64 s390x aarch64
530205e
# Passes on ppc64le: 
530205e
#   libomptarget :: powerpc64le-ibm-linux-gnu :: mapping/target_derefence_array_pointrs.cpp
530205e
#   libomptarget :: powerpc64le-ibm-linux-gnu-LTO :: mapping/target_derefence_array_pointrs.cpp
530205e
# Passes on x86_64:
530205e
#   libomptarget :: x86_64-pc-linux-gnu :: mapping/target_derefence_array_pointrs.cpp
530205e
#   libomptarget :: x86_64-pc-linux-gnu-LTO :: mapping/target_derefence_array_pointrs.cpp
c58a88e
# Passes on s390x:
c58a88e
#   libomptarget :: s390x-ibm-linux-gnu :: mapping/target_derefence_array_pointrs.cpp
c58a88e
#   libomptarget :: s390x-ibm-linux-gnu-LTO :: mapping/target_derefence_array_pointrs.cpp
530205e
export LIT_XFAIL="$LIT_XFAIL;mapping/target_derefence_array_pointrs.cpp" 
530205e
%endif
530205e
530205e
%ifnarch x86_64
530205e
# Passes on x86_64:
530205e
#   libomptarget :: x86_64-pc-linux-gnu :: api/ompx_3d.c
530205e
#   libomptarget :: x86_64-pc-linux-gnu :: api/ompx_3d.cpp
530205e
#   libomptarget :: x86_64-pc-linux-gnu-LTO :: api/ompx_3d.c
530205e
#   libomptarget :: x86_64-pc-linux-gnu-LTO :: api/ompx_3d.cpp
530205e
# libomptarget :: aarch64-unknown-linux-gnu :: 
530205e
export LIT_XFAIL="$LIT_XFAIL;api/ompx_3d.c" 
530205e
export LIT_XFAIL="$LIT_XFAIL;api/ompx_3d.cpp"
530205e
%endif
530205e
530205e
%ifarch %ix86
530205e
# Clang Tools :: clang-tidy/checkers/altera/struct-pack-align.cpp
530205e
export LIT_XFAIL="$LIT_XFAIL;clang-tidy/checkers/altera/struct-pack-align.cpp"
530205e
%endif
530205e
530205e
%ifarch ppc64le
530205e
export LIT_XFAIL="$LIT_XFAIL;barrier/barrier.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;critical/critical.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;critical/lock-nested.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;critical/lock.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;parallel/parallel-firstprivate.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;parallel/parallel-nosuppression.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;parallel/parallel-simple.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;parallel/parallel-simple2.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;races/critical-unrelated.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;races/lock-nested-unrelated.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;races/lock-unrelated.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;races/parallel-simple.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;races/task-dependency.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;races/task-taskgroup-unrelated.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;races/task-taskwait-nested.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;races/task-two.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;races/taskwait-depend.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;reduction/parallel-reduction-nowait.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;reduction/parallel-reduction.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;task/omp_task_depend_all.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;task/task-barrier.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;task/task-create.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;task/task-dependency.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;task/task-taskgroup-nested.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;task/task-taskgroup.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;task/task-taskwait-nested.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;task/task-taskwait.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;task/task_early_fulfill.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;task/task_late_fulfill.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;task/taskwait-depend.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;worksharing/ordered.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api/omp_dynamic_shared_memory.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;jit/empty_kernel_lvl1.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;jit/empty_kernel_lvl2.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;jit/type_punning.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/barrier_fence.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/bug49334.cpp"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/default_thread_limit.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/ompx_bare.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/ompx_coords.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/ompx_saxpy_mixed.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/small_trip_count.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/small_trip_count_thread_limit.cpp"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/spmdization.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/target_critical_region.cpp"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/thread_limit.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_1.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;api/omp_dynamic_shared_memory.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;jit/empty_kernel_lvl1.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;jit/empty_kernel_lvl2.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;jit/type_punning.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/barrier_fence.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/bug49334.cpp"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/default_thread_limit.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/ompx_bare.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/ompx_coords.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/ompx_saxpy_mixed.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/small_trip_count.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/small_trip_count_thread_limit.cpp"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/spmdization.c"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/target_critical_region.cpp"
530205e
export LIT_XFAIL="$LIT_XFAIL;offloading/thread_limit.c"
e9a6ffb
export LIT_XFAIL="$LIT_XFAIL;mapping/auto_zero_copy.cpp"
e9a6ffb
export LIT_XFAIL="$LIT_XFAIL;mapping/auto_zero_copy_globals.cpp"
e9a6ffb
export LIT_XFAIL="$LIT_XFAIL;offloading/workshare_chunk.c"
e9a6ffb
export LIT_XFAIL="$LIT_XFAIL;ompt/target_memcpy.c"
e9a6ffb
export LIT_XFAIL="$LIT_XFAIL;ompt/target_memcpy_emi.c"
530205e
%endif
530205e
e9a6ffb
%ifarch s390x ppc64le
c58a88e
export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_1.c"
c58a88e
export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c"
c58a88e
export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_many_GELTGT_int.c"
c58a88e
export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_many_GTGEGT_int.c"
c58a88e
export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_many_LTLEGE_int.c"
c58a88e
export LIT_XFAIL="$LIT_XFAIL;worksharing/for/omp_collapse_one_int.c"
c58a88e
%endif
c58a88e
530205e
#endregion
530205e
a503825
# Prepare LIT_FILTER_OUT regex from index bash array
a503825
# Join each element with a pipe symbol (regex for "or")
a503825
filter_out_tests=$(printf "|%s" "${filter_out_tests[@]}")
a503825
# Remove the initial pipe symbol
a503825
filter_out_tests=${filter_out_tests:1}
a503825
# Properly escape path dots (".") for use in regular expression 
a503825
filter_out_tests=$(echo $filter_out_tests | sed 's/\./\\./')
a503825
# Add enclosing parenthesis
a503825
export LIT_FILTER_OUT="($filter_out_tests)"
a503825
a503825
530205e
export LIT_OPTS="-vv"
530205e
530205e
export LD_LIBRARY_PATH="%{buildroot}/%{install_libdir}:%{buildroot}/%{_libdir}";
530205e
530205e
cd llvm
e160938
%cmake_build --target check-llvm check-clang
530205e
530205e
%endif
530205e
530205e
%endif