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 <yegorlz@amazon.co.uk>
  • Loading branch information
ShadowCurse committed Oct 17, 2023
1 parent 0b3ba62 commit e71046f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 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,24 @@
# 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}")

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

0 comments on commit e71046f

Please sign in to comment.