@@ -15,14 +15,20 @@ class TestSetupAndroidWithConfig:
1515
1616 def test_setup_android_reads_config (self , tmp_path ):
1717 """Test that setup-android reads SDK location from config."""
18- # Create a test config
18+ # Create a test config with x86_64 architecture
1919 config_data = {
2020 "project" : {
2121 "name" : "test" ,
2222 "run_id" : "test_001" ,
2323 "cache_dir" : str (tmp_path / "test_cache" ),
2424 },
25- "openvino" : {"mode" : "build" },
25+ "openvino" : {
26+ "mode" : "build" ,
27+ "toolchain" : {
28+ "abi" : "x86_64" , # Specify architecture to match what we check
29+ "api_level" : 30 ,
30+ },
31+ },
2632 "device" : {"kind" : "android" , "serials" : []},
2733 "models" : [{"name" : "model1" , "path" : "model1.xml" }],
2834 "report" : {"sinks" : [{"type" : "json" , "path" : "results.json" }]},
@@ -34,11 +40,11 @@ def test_setup_android_reads_config(self, tmp_path):
3440
3541 with patch ("ovmobilebench.android.installer.api.verify_installation" ) as mock_verify :
3642 with patch ("ovmobilebench.android.installer.api.ensure_android_tools" ) as mock_ensure :
37- # Mock verification to say everything is installed
43+ # Mock verification to say everything is installed (with x86_64)
3844 mock_verify .return_value = {
3945 "platform_tools" : True ,
4046 "emulator" : True ,
41- "system_images" : ["system-images;android-30;google_apis;arm64-v8a " ],
47+ "system_images" : ["system-images;android-30;google_apis;x86_64 " ],
4248 "ndk_versions" : ["27.2.12479018" ],
4349 }
4450
@@ -56,14 +62,20 @@ def test_setup_android_reads_config(self, tmp_path):
5662
5763 def test_setup_android_installs_missing_components (self , tmp_path ):
5864 """Test that setup-android installs only missing components."""
59- # Create a test config
65+ # Create a test config with x86_64 architecture
6066 config_data = {
6167 "project" : {
6268 "name" : "test" ,
6369 "run_id" : "test_001" ,
6470 "cache_dir" : str (tmp_path / "test_cache" ),
6571 },
66- "openvino" : {"mode" : "build" },
72+ "openvino" : {
73+ "mode" : "build" ,
74+ "toolchain" : {
75+ "abi" : "x86_64" ,
76+ "api_level" : 30 ,
77+ },
78+ },
6779 "device" : {"kind" : "android" , "serials" : []},
6880 "models" : [{"name" : "model1" , "path" : "model1.xml" }],
6981 "report" : {"sinks" : [{"type" : "json" , "path" : "results.json" }]},
@@ -79,11 +91,16 @@ def test_setup_android_installs_missing_components(self, tmp_path):
7991 mock_verify .return_value = {
8092 "platform_tools" : True ,
8193 "emulator" : True ,
82- "system_images" : ["system-images;android-30;google_apis;arm64-v8a " ],
94+ "system_images" : ["system-images;android-30;google_apis;x86_64 " ],
8395 "ndk_versions" : [], # NDK missing
8496 }
8597
86- mock_ensure .return_value = MagicMock (returncode = 0 )
98+ mock_ensure .return_value = {
99+ "sdk_root" : str (tmp_path / "test_cache" / "android-sdk" ),
100+ "ndk_path" : str (
101+ tmp_path / "test_cache" / "android-sdk" / "ndk" / "27.2.12479018"
102+ ),
103+ }
87104
88105 result = runner .invoke (
89106 app ,
0 commit comments