Skip to content

Commit 4c65c30

Browse files
roypatwearyzen
authored andcommitted
test: Run unittests in debug mode
Running unittests in debug mode gives us greater correctness guarantees, since `debug_assert!`s will be triggered. These are often used to perform "sanity checks" that are supposed to get compiled out in release mode for performance reasons. Additionally, our coverage test runs in debug bug, so this will make the behavior between the two tests consistent (whereas otherwise a failure of one but not the other due to a debug assertion will be confusing). Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
1 parent e97aba7 commit 4c65c30

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/integration_tests/build/test_unittests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""A test that ensures that all unit tests pass at integration time."""
44

55
import platform
6+
67
import pytest
78

89
import host_tools.cargo_build as host # pylint:disable=import-error
@@ -13,12 +14,13 @@
1314
# run coverage with the `gnu` toolchains and run unit tests with the `musl` toolchains.
1415
TARGET = "{}-unknown-linux-musl".format(MACHINE)
1516

17+
1618
@pytest.mark.timeout(600)
1719
def test_unittests(test_fc_session_root_path):
1820
"""
1921
Run unit and doc tests for all supported targets.
2022
"""
21-
extra_args = "--release --target {} ".format(TARGET)
23+
extra_args = "--target {} ".format(TARGET)
2224

2325
host.cargo_test(test_fc_session_root_path, extra_args=extra_args)
2426

0 commit comments

Comments
 (0)