Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ build:x86_64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene
build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix
build:x86_64-linux --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0
build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu
build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu_miri

# -------------------------------------------------------------------------------
# Ferrocene Rust coverage config
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ jobs:
run: |
echo "Running: bazel test --lockfile_mode=error --config=x86_64-linux //src/..."
bazel test --lockfile_mode=error --config=x86_64-linux //src/...

- name: Run Miri Tests via Bazel
run: |
echo "Running: bazel test --lockfile_mode=error --config=x86_64-linux //:miri_tests --test_output=errors"
bazel test --lockfile_mode=error --config=x86_64-linux //:miri_tests --test_output=errors
18 changes: 18 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,21 @@ docs(
],
source_dir = "docs",
)


# Miri test suite
test_suite(
name = "miri_tests",
testonly = True,
tests = [
"//src/containers:tests_miri",
"//src/elementary:tests_miri",
"//src/log/score_log:tests_miri",
"//src/log/score_log_fmt:tests_miri",
"//src/log/score_log_fmt_macro:tests_miri",
"//src/log/stdout_logger:tests_miri",
"//src/pal:tests_miri",
"//src/sync:tests_miri",
"//src/thread:tests_miri",
],
)
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module(name = "score_baselibs_rust")
# Bazel global rules
bazel_dep(name = "rules_python", version = "1.4.1")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_rust", version = "0.68.1-score")
bazel_dep(name = "rules_rust", version = "0.68.2-score")
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "aspect_rules_lint", version = "2.0.0")
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1")
Expand All @@ -33,7 +33,7 @@ bazel_dep(name = "score_platform", version = "0.5.5") # This is main score repo

# Toolchains and extensions
bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.5.1", dev_dependency = True)
bazel_dep(name = "score_toolchains_rust", version = "0.8.0", dev_dependency = True)
bazel_dep(name = "score_toolchains_rust", version = "0.9.1", dev_dependency = True)

# S-CORE crates
bazel_dep(name = "score_crates", version = "0.0.6")
Expand Down
198 changes: 143 additions & 55 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion src/containers/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load("@rules_rust//rust:defs.bzl", "miri_test", "rust_library", "rust_test")

rust_library(
name = "containers",
Expand All @@ -32,3 +32,10 @@ rust_test(
"ut",
],
)

miri_test(
name = "tests_miri",
crate = ":tests",
tags = ["manual"],
visibility = ["//visibility:public"],
)
9 changes: 8 additions & 1 deletion src/elementary/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load("@rules_rust//rust:defs.bzl", "miri_test", "rust_library", "rust_test")

rust_library(
name = "elementary",
Expand All @@ -28,3 +28,10 @@ rust_test(
"ut",
],
)

miri_test(
name = "tests_miri",
crate = ":tests",
tags = ["manual"],
visibility = ["//visibility:public"],
)
9 changes: 8 additions & 1 deletion src/log/score_log/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load("@rules_rust//rust:defs.bzl", "miri_test", "rust_library", "rust_test")

rust_library(
name = "score_log",
Expand All @@ -32,3 +32,10 @@ rust_test(
"ut",
],
)

miri_test(
name = "tests_miri",
crate = ":tests",
tags = ["manual"],
visibility = ["//visibility:public"],
)
9 changes: 8 additions & 1 deletion src/log/score_log_fmt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load("@rules_rust//rust:defs.bzl", "miri_test", "rust_library", "rust_test")

rust_library(
name = "score_log_fmt",
Expand All @@ -33,3 +33,10 @@ rust_test(
"ut",
],
)

miri_test(
name = "tests_miri",
crate = ":tests",
tags = ["manual"],
visibility = ["//visibility:public"],
)
9 changes: 8 additions & 1 deletion src/log/score_log_fmt_macro/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("@rules_rust//rust:defs.bzl", "rust_proc_macro", "rust_test")
load("@rules_rust//rust:defs.bzl", "miri_test", "rust_proc_macro", "rust_test")

rust_proc_macro(
name = "score_log_fmt_macro",
Expand Down Expand Up @@ -39,3 +39,10 @@ rust_test(
"//src/log/score_log_fmt",
],
)

miri_test(
name = "tests_miri",
crate = ":tests",
tags = ["manual"],
visibility = ["//visibility:public"],
)
9 changes: 8 additions & 1 deletion src/log/stdout_logger/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
For production use `score_logging`.
"""

load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load("@rules_rust//rust:defs.bzl", "miri_test", "rust_library", "rust_test")

rust_library(
name = "stdout_logger",
Expand All @@ -35,3 +35,10 @@ rust_test(
"ut",
],
)

miri_test(
name = "tests_miri",
crate = ":tests",
tags = ["manual"],
visibility = ["//visibility:public"],
)
9 changes: 8 additions & 1 deletion src/pal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load("@rules_rust//rust:defs.bzl", "miri_test", "rust_library", "rust_test")

rust_library(
name = "pal",
Expand All @@ -33,3 +33,10 @@ rust_test(
"ut",
],
)

miri_test(
name = "tests_miri",
crate = ":tests",
tags = ["manual"],
visibility = ["//visibility:public"],
)
9 changes: 8 additions & 1 deletion src/sync/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load("@rules_rust//rust:defs.bzl", "miri_test", "rust_library", "rust_test")

rust_library(
name = "sync",
Expand All @@ -31,3 +31,10 @@ rust_test(
"ut",
],
)

miri_test(
name = "tests_miri",
crate = ":tests",
tags = ["manual"],
visibility = ["//visibility:public"],
)
9 changes: 8 additions & 1 deletion src/thread/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load("@rules_rust//rust:defs.bzl", "miri_test", "rust_library", "rust_test")

rust_library(
name = "thread",
Expand All @@ -32,3 +32,10 @@ rust_test(
"ut",
],
)

miri_test(
name = "tests_miri",
crate = ":tests",
tags = ["manual"],
visibility = ["//visibility:public"],
)
Loading