CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
172 lines
4.7 KiB
Python
172 lines
4.7 KiB
Python
# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
|
|
# See https://llvm.org/LICENSE.txt for license information.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
# LLVM libc unittest library.
|
|
|
|
load("//libc/test:libc_test_rules.bzl", "libc_test_library")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
licenses(["notice"])
|
|
|
|
libc_test_library(
|
|
name = "test_logger",
|
|
srcs = ["TestLogger.cpp"],
|
|
hdrs = ["TestLogger.h"],
|
|
deps = [
|
|
"//libc:__support_big_int",
|
|
"//libc:__support_cpp_string",
|
|
"//libc:__support_cpp_string_view",
|
|
"//libc:__support_macros_config",
|
|
"//libc:__support_macros_properties_types",
|
|
"//libc:__support_osutil_io",
|
|
"//libc:__support_uint128",
|
|
"//libc:func_aligned_alloc",
|
|
"//libc:func_free",
|
|
"//libc:func_malloc",
|
|
"//libc:func_realloc",
|
|
"//libc:hdr_stdint_proxy",
|
|
],
|
|
)
|
|
|
|
libc_test_library(
|
|
name = "LibcUnitTest",
|
|
srcs = [
|
|
"BazelFilePath.cpp",
|
|
"ExecuteFunctionUnix.cpp",
|
|
"LibcDeathTestExecutors.cpp",
|
|
"LibcTest.cpp",
|
|
"LibcTestMain.cpp",
|
|
],
|
|
hdrs = [
|
|
"ErrnoCheckingTest.h",
|
|
"ErrnoSetterMatcher.h",
|
|
"ExecuteFunction.h",
|
|
"LibcTest.h",
|
|
"PlatformDefs.h",
|
|
"Test.h",
|
|
],
|
|
deps = [
|
|
":test_logger",
|
|
"//libc:__support_c_string",
|
|
"//libc:__support_cpp_bit",
|
|
"//libc:__support_cpp_bitset",
|
|
"//libc:__support_cpp_limits",
|
|
"//libc:__support_cpp_span",
|
|
"//libc:__support_cpp_string",
|
|
"//libc:__support_cpp_string_view",
|
|
"//libc:__support_cpp_type_traits",
|
|
"//libc:__support_fixed_point",
|
|
"//libc:__support_fputil_fp_bits",
|
|
"//libc:__support_fputil_fpbits_str",
|
|
"//libc:__support_fputil_rounding_mode",
|
|
"//libc:__support_libc_errno",
|
|
"//libc:__support_macros_config",
|
|
"//libc:__support_macros_properties_architectures",
|
|
"//libc:__support_macros_properties_compiler",
|
|
"//libc:__support_macros_properties_types",
|
|
"//libc:__support_stringutil",
|
|
"//libc:__support_uint128",
|
|
"//libc:errno",
|
|
"//libc:func_aligned_alloc",
|
|
"//libc:func_free",
|
|
"//libc:func_malloc",
|
|
"//libc:func_realloc",
|
|
"//libc:hdr_stdint_proxy",
|
|
"//libc:llvm_libc_macros_stdfix_macros",
|
|
"//llvm:Support",
|
|
],
|
|
# Force linking in this library's `main()` to surface
|
|
# a duplicate symbol error if a test defines its own main.
|
|
alwayslink = True,
|
|
)
|
|
|
|
libc_test_library(
|
|
name = "fp_test_helpers",
|
|
srcs = [
|
|
"FEnvSafeTest.cpp",
|
|
"FPExceptMatcher.cpp",
|
|
"RoundingModeUtils.cpp",
|
|
],
|
|
hdrs = [
|
|
"FEnvSafeTest.h",
|
|
"FPExceptMatcher.h",
|
|
"FPMatcher.h",
|
|
"RoundingModeUtils.h",
|
|
],
|
|
deps = [
|
|
":LibcUnitTest",
|
|
":string_utils",
|
|
":test_logger",
|
|
"//libc:__support_cpp_array",
|
|
"//libc:__support_cpp_bit",
|
|
"//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_libc_errno",
|
|
"//libc:__support_macros_config",
|
|
"//libc:__support_macros_optimization",
|
|
"//libc:__support_macros_properties_architectures",
|
|
"//libc:hdr_fenv_macros",
|
|
"//libc:hdr_math_macros",
|
|
"//libc:hdr_stdint_proxy",
|
|
"//libc:types_fenv_t",
|
|
],
|
|
)
|
|
|
|
libc_test_library(
|
|
name = "memory_matcher",
|
|
srcs = [
|
|
"MemoryMatcher.cpp",
|
|
],
|
|
hdrs = [
|
|
"MemoryMatcher.h",
|
|
],
|
|
deps = [
|
|
":LibcUnitTest",
|
|
"//libc:__support_cpp_bit",
|
|
"//libc:__support_cpp_bitset",
|
|
"//libc:__support_cpp_span",
|
|
"//libc:__support_cpp_type_traits",
|
|
"//libc:__support_ctype_utils",
|
|
"//libc:__support_macros_config",
|
|
],
|
|
)
|
|
|
|
libc_test_library(
|
|
name = "printf_matcher",
|
|
srcs = [
|
|
"PrintfMatcher.cpp",
|
|
],
|
|
hdrs = [
|
|
"PrintfMatcher.h",
|
|
],
|
|
deps = [
|
|
":LibcUnitTest",
|
|
":string_utils",
|
|
"//libc:__support_fputil_fp_bits",
|
|
"//libc:__support_macros_config",
|
|
"//libc:hdr_stdint_proxy",
|
|
"//libc:printf_core_structs",
|
|
],
|
|
)
|
|
|
|
libc_test_library(
|
|
name = "string_utils",
|
|
hdrs = [
|
|
"StringUtils.h",
|
|
],
|
|
deps = [
|
|
"//libc:__support_big_int",
|
|
"//libc:__support_cpp_string",
|
|
"//libc:__support_cpp_type_traits",
|
|
"//libc:__support_macros_config",
|
|
],
|
|
)
|