build: bundle adb platform tools
This commit is contained in:
1 parent
ecbd07cea0
commit
f257c4e3fc
11 files changed
+207
-6
No files matched your search
@@ -27,6 +27,10 @@ class TestAdbPath:
|
||||
def test_default_returns_adb(self, monkeypatch):
|
||||
# 默认走 ADB_EXECUTABLE 环境变量;如果未设,应返回 'adb'
|
||||
monkeypatch.delenv("ADB_EXECUTABLE", raising=False)
|
||||
monkeypatch.setattr(
|
||||
"douyin.core.underlying_operations_pkg.adb_helpers.path_config.find_bundled_adb",
|
||||
lambda: None,
|
||||
)
|
||||
assert _adb_path() == "adb"
|
||||
|
||||
def test_env_override(self, monkeypatch):
|
||||
@@ -38,6 +42,14 @@ class TestAdbPath:
|
||||
# 包了引号的应当去引号返回 raw 路径
|
||||
assert _adb_path() == "C:\\Program Files\\adb.exe"
|
||||
|
||||
def test_uses_bundled_adb_when_env_missing(self, monkeypatch):
|
||||
monkeypatch.delenv("ADB_EXECUTABLE", raising=False)
|
||||
monkeypatch.setattr(
|
||||
"douyin.core.underlying_operations_pkg.adb_helpers.path_config.find_bundled_adb",
|
||||
lambda: r"C:\App\platform-tools\adb.exe",
|
||||
)
|
||||
assert _adb_path() == r"C:\App\platform-tools\adb.exe"
|
||||
|
||||
|
||||
class TestAdbArgs:
|
||||
def test_basic(self):
|
||||
|
||||
Reference in new issue
Block a user