Skip to content

Commit 4e37d75

Browse files
committed
aarch64: enforce clippy test
Signed-off-by: Diana Popa <dpopa@amazon.com>
1 parent f003eb1 commit 4e37d75

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

tests/integration_tests/build/test_style.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@
1111
import framework.utils as utils
1212

1313
SUCCESS_CODE = 0
14+
MACHINE = platform.machine()
15+
TARGETS = ["{}-unknown-linux-gnu".format(MACHINE),
16+
"{}-unknown-linux-musl".format(MACHINE)]
1417

1518

1619
@pytest.mark.timeout(120)
1720
@pytest.mark.skipif(
18-
platform.machine() != "x86_64",
21+
MACHINE != "x86_64",
1922
reason="no need to test it on multiple platforms"
2023
)
2124
def test_rust_style():
@@ -30,7 +33,7 @@ def test_rust_style():
3033

3134
@pytest.mark.timeout(120)
3235
@pytest.mark.skipif(
33-
platform.machine() != "x86_64",
36+
MACHINE != "x86_64",
3437
reason="no need to test it on multiple platforms"
3538
)
3639
def test_python_style():
@@ -66,14 +69,14 @@ def test_python_style():
6669
])
6770

6871

69-
@pytest.mark.skipif(
70-
platform.machine() != "x86_64",
71-
reason="no need to test it on multiple platforms"
72+
@pytest.mark.parametrize(
73+
"target",
74+
TARGETS
7275
)
73-
def test_rust_clippy():
76+
def test_rust_clippy(target):
7477
"""Fails if clippy generates any error, warnings are ignored."""
7578
utils.run_cmd(
76-
'cargo clippy --all --profile test -- -D warnings')
79+
'cargo clippy --target {} --all --profile test -- -D warnings'.format(target))
7780

7881

7982
def check_swagger_style(yaml_spec):
@@ -87,7 +90,7 @@ def check_swagger_style(yaml_spec):
8790

8891

8992
@pytest.mark.skipif(
90-
platform.machine() != "x86_64",
93+
MACHINE != "x86_64",
9194
reason="no need to test it on multiple platforms"
9295
)
9396
def test_firecracker_swagger():

0 commit comments

Comments
 (0)