Skip to content

Commit 8a14cc5

Browse files
committed
Automatic xfail on python injection for ARM64 target process
1 parent 1ad4560 commit 8a14cc5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/pfwtest.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ def system_architecture_only(target_archi):
3232
return pytest.mark.skipif(windows.system.architecture != target_archi,
3333
reason="Test for {0} architecture system only".format(target_archi))
3434

35+
@pytest.fixture(scope="function")
36+
def check_cross_heaven_gate_arm64_xfail(request):
37+
"""Mark test crossing the heaven gate as xfail on x86 to arm64"""
38+
if windows.current_process._is_x86_on_arm64:
39+
request.applymarker("xfail")
40+
41+
def cross_heaven_gates(tstfunc):
42+
tstfunc = pytest.mark.usefixtures("check_cross_heaven_gate_arm64_xfail")(tstfunc)
43+
tstfunc = pytest.mark.cross_heaven_gate(tstfunc)
44+
return tstfunc
45+
3546
check_for_gc_garbage = pytest.mark.usefixtures("check_for_gc_garbage")
3647
check_for_handle_leak = pytest.mark.usefixtures("check_for_handle_leak")
3748

@@ -62,6 +73,9 @@ def check_injected_python_installed(request):
6273
proc = request.getfixturevalue(procparam)
6374
if not windows.injection.find_python_dll_to_inject(proc.bitness):
6475
pytest.skip("Python {0}b not installed -> skipping test with python injection into {0}b process".format(proc.bitness))
76+
# xfail ARM64 injection as its not implemented
77+
if proc.architecture == gdef.IMAGE_FILE_MACHINE_ARM64:
78+
request.applymarker("xfail")
6579
return None
6680

6781

0 commit comments

Comments
 (0)