From 32332d9496743c2d1e7ccef0e36505f2d4deed67 Mon Sep 17 00:00:00 2001 From: Jack Thomson Date: Tue, 1 Oct 2024 15:46:09 +0000 Subject: [PATCH] tests: Add build test for GDB Adding a test to ensure that firecracker will build with the gdb flag enabled Signed-off-by: Jack Thomson --- tests/integration_tests/build/test_gdb.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/integration_tests/build/test_gdb.py diff --git a/tests/integration_tests/build/test_gdb.py b/tests/integration_tests/build/test_gdb.py new file mode 100644 index 00000000000..541807dd5c1 --- /dev/null +++ b/tests/integration_tests/build/test_gdb.py @@ -0,0 +1,19 @@ +# Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 +"""A test that ensures that firecracker builds with GDB feature enabled at integration time.""" + +import platform + +import pytest + +import host_tools.cargo_build as host + +MACHINE = platform.machine() +TARGET = "{}-unknown-linux-musl".format(MACHINE) + + +@pytest.mark.skipif(MACHINE != "x86_64", reason="GDB runs only on x86_64.") +def test_gdb_compiles(): + """Checks that Firecracker compiles with GDB enabled""" + + host.cargo("build", f"--features gdb --target {TARGET}")