Skip to content

Commit

Permalink
[libc][bazel] fix fenv tests after refactor
Browse files Browse the repository at this point in the history
The PR llvm#89658 updated up the fenv tests work, this patch updates the
bazel to match.
  • Loading branch information
michaelrj-google committed Apr 23, 2024
1 parent 5ac744d commit 63ff3c2
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ libc_support_library(
"//libc:__support_cpp_bitset",
"//libc:__support_cpp_span",
"//libc:__support_cpp_type_traits",
"//libc:__support_cpp_utility",
"//libc:__support_fputil_fenv_impl",
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_fpbits_str",
"//libc:__support_fputil_rounding_mode",
"//libc:__support_macros_properties_architectures",
"//libc:hdr_fenv_macros",
"//libc:hdr_math_macros",
"//libc:hdr_fenv_macros",
"//libc:types_fenv_t",
"//libc:types_fenv_t",
],
)

Expand Down
45 changes: 36 additions & 9 deletions utils/bazel/llvm-project-overlay/libc/test/src/fenv/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@

# Tests for LLVM libc math.h functions.

load("//libc:libc_build_rules.bzl", "libc_support_library")
load("//libc/test:libc_test_rules.bzl", "libc_test")

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

libc_support_library(
name = "excepts",
hdrs = ["excepts.h"],
deps = [
"//libc:hdr_fenv_macros",
],
)

libc_test(
name = "exception_status_test",
srcs = ["exception_status_test.cpp"],
Expand All @@ -20,8 +29,10 @@ libc_test(
"//libc:fetestexcept",
],
deps = [
":excepts",
"//libc:__support_fputil_fenv_impl",
"//libc:hdr_fenv_macros",
"//libc:hdr_fenv_macros",
"//libc/test/UnitTest:fp_test_helpers",
],
)

Expand All @@ -32,7 +43,11 @@ libc_test(
"//libc:fegetround",
"//libc:fesetround",
],
deps = ["//libc:hdr_fenv_macros"],
deps = [
":excepts",
"//libc:hdr_fenv_macros",
"//libc/test/UnitTest:fp_test_helpers",
],
)

libc_test(
Expand All @@ -45,11 +60,12 @@ libc_test(
],
tags = ["nosan"],
deps = [
":excepts",
"//libc:__support_common",
"//libc:__support_fputil_fenv_impl",
"//libc:__support_macros_properties_architectures",
"//libc:hdr_fenv_macros",
"//libc/test/UnitTest:fp_test_helpers",
"//libc:hdr_fenv_macros",
],
)

Expand All @@ -61,11 +77,12 @@ libc_test(
],
tags = ["nosan"],
deps = [
":excepts",
"//libc:__support_common",
"//libc:__support_fputil_fenv_impl",
"//libc:__support_macros_properties_architectures",
"//libc:types_fenv_t",
"//libc/test/UnitTest:fp_test_helpers",
"//libc:types_fenv_t",
],
)

Expand All @@ -78,8 +95,10 @@ libc_test(
"//libc:fetestexceptflag",
],
deps = [
":excepts",
"//libc:__support_fputil_fenv_impl",
"//libc:types_fexcept_t",
"//libc:types_fexcept_t",
"//libc/test/UnitTest:fp_test_helpers",
],
)

Expand All @@ -90,8 +109,10 @@ libc_test(
"//libc:feclearexcept",
],
deps = [
":excepts",
"//libc:__support_fputil_fenv_impl",
"//libc:hdr_fenv_macros",
"//libc:hdr_fenv_macros",
"//libc/test/UnitTest:fp_test_helpers",
],
)

Expand All @@ -104,9 +125,11 @@ libc_test(
"//libc:fegetexcept",
],
deps = [
":excepts",
"//libc:__support_common",
"//libc:__support_macros_properties_architectures",
"//libc:hdr_fenv_macros",
"//libc:hdr_fenv_macros",
"//libc/test/UnitTest:fp_test_helpers",
],
)

Expand All @@ -117,8 +140,10 @@ libc_test(
"//libc:feupdateenv",
],
deps = [
":excepts",
"//libc:__support_fputil_fenv_impl",
"//libc:types_fenv_t",
"//libc:types_fenv_t",
"//libc/test/UnitTest:fp_test_helpers",
],
)

Expand All @@ -132,7 +157,9 @@ libc_test(
"//libc:fesetround",
],
deps = [
":excepts",
"//libc:__support_fputil_fenv_impl",
"//libc:types_fenv_t",
"//libc:types_fenv_t",
"//libc/test/UnitTest:fp_test_helpers",
],
)

0 comments on commit 63ff3c2

Please sign in to comment.