2020-08-17 08:21:02 +00:00
|
|
|
# MIT licensed
|
|
|
|
# Copyright (c) 2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
2020-10-05 17:40:04 +00:00
|
|
|
# Copyright (c) 2017 Chih-Hsuan Yen <yan12125 at gmail dot com>
|
2020-08-17 08:21:02 +00:00
|
|
|
|
|
|
|
import pytest
|
|
|
|
pytestmark = [pytest.mark.asyncio, pytest.mark.needs_net]
|
|
|
|
|
|
|
|
async def test_android_addon(get_version):
|
|
|
|
assert await get_version("android-google-play-apk-expansion", {
|
|
|
|
"source": "android_sdk",
|
|
|
|
"android_sdk": "extras;google;market_apk_expansion",
|
|
|
|
"repo": "addon",
|
|
|
|
}) == "1.r03"
|
|
|
|
|
|
|
|
async def test_android_package(get_version):
|
|
|
|
assert await get_version("android-sdk-cmake", {
|
|
|
|
"source": "android_sdk",
|
|
|
|
"android_sdk": "cmake;",
|
|
|
|
"repo": "package",
|
2022-08-12 05:52:04 +00:00
|
|
|
}) == "3.22.1"
|
2019-12-17 07:29:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
async def test_android_package_channel(get_version):
|
|
|
|
assert await get_version("android-sdk-cmake", {
|
|
|
|
"source": "android_sdk",
|
2022-08-12 05:52:04 +00:00
|
|
|
"android_sdk": "ndk;",
|
2019-12-17 07:29:27 +00:00
|
|
|
"repo": "package",
|
|
|
|
"channel": "beta,dev,canary",
|
2023-08-22 10:40:01 +00:00
|
|
|
}) == "26.0.10636728"
|
2021-12-04 10:58:34 +00:00
|
|
|
|
|
|
|
async def test_android_list(get_version):
|
|
|
|
assert await get_version("android-sdk-cmake-older", {
|
|
|
|
"source": "android_sdk",
|
|
|
|
"android_sdk": "cmake;",
|
|
|
|
"repo": "package",
|
2022-04-07 06:06:03 +00:00
|
|
|
"include_regex": r"3\.10.*",
|
2021-12-04 10:58:34 +00:00
|
|
|
}) == "3.10.2"
|
|
|
|
|
|
|
|
async def test_android_package_os(get_version):
|
|
|
|
await get_version("android-usb-driver", {
|
|
|
|
"source": "android_sdk",
|
|
|
|
"android_sdk": "extras;google;usb_driver",
|
|
|
|
"repo": "addon",
|
|
|
|
"host_os": "windows"
|
|
|
|
}) == "13"
|
|
|
|
|
|
|
|
async def test_android_package_os_missing(get_version):
|
|
|
|
await get_version("android-usb-driver", {
|
|
|
|
"source": "android_sdk",
|
|
|
|
"android_sdk": "extras;google;usb_driver",
|
|
|
|
"repo": "addon",
|
|
|
|
"host_os": "linux"
|
|
|
|
}) == None
|