Skip to content

Commit

Permalink
feat: added GNU for unit tests targets
Browse files Browse the repository at this point in the history
Now unit tests are run for musl and gnu targets.
This is done, because we have some tests that
only work with gnu.

Signed-off-by: Egor Lazarchuk <[email protected]>
  • Loading branch information
ShadowCurse committed Oct 16, 2023
1 parent e7ed22b commit d0fea7f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/integration_tests/build/test_unittests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,25 @@
# Currently profiling with `aarch64-unknown-linux-musl` is unsupported (see
# https://github.com/rust-lang/rustup/issues/3095#issuecomment-1280705619) therefore we profile and
# run coverage with the `gnu` toolchains and run unit tests with the `musl` toolchains.
TARGET = "{}-unknown-linux-musl".format(MACHINE)
TARGETS = [
"{}-unknown-linux-musl".format(MACHINE),
"{}-unknown-linux-gnu".format(MACHINE),
]


@pytest.mark.timeout(600)
def test_unittests(test_fc_session_root_path):
"""
Run unit and doc tests for all supported targets.
"""
extra_args = "--target {} ".format(TARGET)

host.cargo_test(test_fc_session_root_path, extra_args=extra_args)
for target in TARGETS:
extra_args = "--target {} ".format(target)
host.cargo_test(test_fc_session_root_path, extra_args=extra_args)


def test_benchmarks_compile():
"""Checks that all benchmarks compile"""
host.cargo("bench", f"--all --no-run --target {TARGET}")
"""Use only musl toolchain"""

host.cargo("bench", f"--all --no-run --target {TARGETS[0]}")

0 comments on commit d0fea7f

Please sign in to comment.