Skip to content

Commit 4347981

Browse files
authored
Merge pull request #30 from aobolensk/debug-android
Fix path settings for Android deployment
1 parent 849f537 commit 4347981

5 files changed

Lines changed: 11 additions & 7 deletions

File tree

ovmobilebench/builders/openvino.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""OpenVINO build system."""
22

33
import logging
4+
import os
45
from pathlib import Path
56

67
from ovmobilebench.config.schema import OpenVINOConfig
@@ -63,6 +64,7 @@ def _configure_cmake(self):
6364
str(self.build_dir),
6465
"-GNinja",
6566
f"-DCMAKE_BUILD_TYPE={self.config.build_type}",
67+
f"-DOUTPUT_ROOT={os.getcwd()}/{self.build_dir}",
6668
]
6769

6870
# Android-specific configuration
@@ -122,8 +124,8 @@ def _build(self):
122124
def get_artifacts(self) -> dict[str, Path]:
123125
"""Get paths to build artifacts."""
124126
artifacts = {
125-
"benchmark_app": self.build_dir / "bin" / "arm64-v8a" / "benchmark_app",
126-
"libs": self.build_dir / "bin" / "arm64-v8a",
127+
"benchmark_app": self.build_dir / "bin" / "aarch64" / "Release" / "benchmark_app",
128+
"libs": self.build_dir / "bin" / "aarch64" / "Release",
127129
}
128130

129131
# Verify artifacts exist

ovmobilebench/pipeline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ def deploy(self) -> None:
104104
logger.info("[DRY RUN] Would deploy to devices")
105105
return
106106

107-
bundle_path = self.artifacts_dir / "packages" / f"ovbundle_{self.config.project.run_id}"
107+
bundle_path = (
108+
self.artifacts_dir / "packages" / f"ovbundle_{self.config.project.run_id}.tar.gz"
109+
)
108110

109111
for serial in self.config.device.serials:
110112
logger.info(f"Deploying to device: {serial}")

ovmobilebench/runners/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def run_single(
4949
}
5050

5151
if rc != 0:
52-
logger.error(f"Benchmark failed: {stderr}")
52+
logger.error(f"Benchmark failed:\n{stdout}\n{stderr}")
5353

5454
return result
5555

tests/builders/test_builders_openvino.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ def test_get_artifacts_success(self, mock_ensure_dir, build_config):
286286
artifacts = builder.get_artifacts()
287287

288288
expected = {
289-
"benchmark_app": Path("/build/dir/bin/arm64-v8a/benchmark_app"),
290-
"libs": Path("/build/dir/bin/arm64-v8a"),
289+
"benchmark_app": Path("/build/dir/bin/aarch64/Release/benchmark_app"),
290+
"libs": Path("/build/dir/bin/aarch64/Release"),
291291
}
292292
assert artifacts == expected
293293

tests/runners/test_runners_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def test_run_single_logs_error_on_failure(self, mock_device, run_config, benchma
301301
# Check that error was logged
302302
mock_logger.error.assert_called_once()
303303
error_call = mock_logger.error.call_args[0][0]
304-
assert "Benchmark failed: benchmark failed" in error_call
304+
assert "Benchmark failed:\n\nbenchmark failed" in error_call
305305

306306
def test_run_matrix_logs_progress(self, mock_device, run_config):
307307
"""Test that run_matrix logs progress information."""

0 commit comments

Comments
 (0)