[reland][libc][bazel] Add tests to the bazel build
authorGuillaume Chatelet <gchatelet@google.com>
Fri, 18 Nov 2022 10:14:37 +0000 (10:14 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Fri, 18 Nov 2022 13:20:52 +0000 (13:20 +0000)
commitd856e5feacd56e01e713323e534c8dba52766b73
treee401a846d68f2e75c4cf389f92020d1baaadf0ed
parent3cf14a7bdce08f8fe03d987a2d99c6ea47c58c03
[reland][libc][bazel] Add tests to the bazel build

This patch adds bazel tests for llvm-libc.

Some math tests rely on the `mpfr` library. This is controlled via the `--@llvm-project//libc:libc_math_mpfr` flag. It can take three values:
 - `external` (default) will build `mpfr` and `gmp` from source.
 - `system` will use the system installed `mpfr` library.
 - `disable` will skip tests relying on `mpfr`.

Reviewed By: sivachandra, GMNGeoffrey

Differential Revision: https://reviews.llvm.org/D119547
15 files changed:
utils/bazel/.bazelrc
utils/bazel/WORKSPACE
utils/bazel/llvm-project-overlay/libc/BUILD.bazel
utils/bazel/llvm-project-overlay/libc/test/BUILD.bazel [new file with mode: 0644]
utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl [new file with mode: 0644]
utils/bazel/llvm-project-overlay/libc/test/src/fenv/BUILD.bazel [new file with mode: 0644]
utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel [new file with mode: 0644]
utils/bazel/llvm-project-overlay/libc/test/src/math/libc_math_test_rules.bzl [new file with mode: 0644]
utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel [new file with mode: 0644]
utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel [new file with mode: 0644]
utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel [new file with mode: 0644]
utils/bazel/llvm-project-overlay/libc/utils/UnitTest/BUILD.bazel [new file with mode: 0644]
utils/bazel/llvm-project-overlay/libc/utils/testutils/BUILD.bazel [new file with mode: 0644]
utils/bazel/third_party_build/gmp.BUILD [new file with mode: 0644]
utils/bazel/third_party_build/mpfr.BUILD [new file with mode: 0644]