23
23
# this contains the frequency while on AMD it does not.
24
24
# Checkout the cpuid crate. In the future other
25
25
# differences may appear.
26
- COVERAGE_DICT = {"Intel" : 84.5 , "AMD" : 84.52 }
26
+ COVERAGE_DICT = {"Intel" : 84.5 , "AMD" : 84.52 , "ARM" : 82 }
27
27
PROC_MODEL = proc .proc_type ()
28
28
29
29
COVERAGE_MAX_DELTA = 0.05
@@ -78,10 +78,6 @@ def test_ensure_mod_tests():
78
78
79
79
80
80
@pytest .mark .timeout (400 )
81
- @pytest .mark .skipif (
82
- platform .machine () != "x86_64" ,
83
- reason = "kcov hangs on aarch64"
84
- )
85
81
def test_coverage (test_session_root_path , test_session_tmp_path ):
86
82
"""Test line coverage with kcov.
87
83
@@ -105,14 +101,17 @@ def test_coverage(test_session_root_path, test_session_tmp_path):
105
101
'_gen'
106
102
)
107
103
exclude_region = '\' mod tests {\' '
104
+ target = "{}-unknown-linux-musl" .format (platform .machine ())
108
105
109
106
cmd = (
110
- 'CARGO_TARGET_DIR={} cargo kcov --all '
111
- '--output {} -- '
107
+ 'RUSTFLAGS="{}" CARGO_TARGET_DIR={} cargo kcov --all '
108
+ '--target {} -- output {} -- '
112
109
'--exclude-pattern={} '
113
110
'--exclude-region={} --verify'
114
111
).format (
112
+ host .get_rustflags (),
115
113
os .path .join (test_session_root_path , CARGO_KCOV_REL_PATH ),
114
+ target ,
116
115
test_session_tmp_path ,
117
116
exclude_pattern ,
118
117
exclude_region
0 commit comments