Path: blob/main/tests/integration_tests/build/test_unittests.py
1958 views
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.1# SPDX-License-Identifier: Apache-2.02"""A test that ensures that all unit tests pass at integration time."""34import platform56import pytest78import host_tools.cargo_build as host # pylint:disable=import-error910MACHINE = platform.machine()11TARGETS = ["{}-unknown-linux-gnu".format(MACHINE),12"{}-unknown-linux-musl".format(MACHINE)]131415@pytest.mark.parametrize(16"target",17TARGETS18)19def test_unittests(test_fc_session_root_path, target):20"""Run unit and doc tests for all supported targets."""21extra_args = "--release --target {} ".format(target)2223if "musl" in target and MACHINE == "x86_64":24pytest.skip("On x86_64 with musl target unit tests"25" are already run as part of testing"26" code-coverage.")2728host.cargo_test(29test_fc_session_root_path,30extra_args=extra_args31)323334