Skip to content

Commit e71046f

Browse files
committed
feat: added GNU for unit tests targets
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>
1 parent 0b3ba62 commit e71046f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tests/integration_tests/build/test_unittests.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,24 @@
1212
# Currently profiling with `aarch64-unknown-linux-musl` is unsupported (see
1313
# https://github.com/rust-lang/rustup/issues/3095#issuecomment-1280705619) therefore we profile and
1414
# run coverage with the `gnu` toolchains and run unit tests with the `musl` toolchains.
15-
TARGET = "{}-unknown-linux-musl".format(MACHINE)
15+
TARGETS = [
16+
"{}-unknown-linux-musl".format(MACHINE),
17+
"{}-unknown-linux-gnu".format(MACHINE),
18+
]
1619

1720

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

25-
host.cargo_test(test_fc_session_root_path, extra_args=extra_args)
27+
for target in TARGETS:
28+
extra_args = "--target {} ".format(target)
29+
host.cargo_test(test_fc_session_root_path, extra_args=extra_args)
2630

2731

2832
def test_benchmarks_compile():
2933
"""Checks that all benchmarks compile"""
30-
host.cargo("bench", f"--all --no-run --target {TARGET}")
34+
35+
host.cargo("bench", f"--all --no-run --target {TARGETS[0]}")

0 commit comments

Comments
 (0)