diff --git a/recipes-devtools/xdevice/files/python-version-compare-fix.patch b/recipes-devtools/xdevice/files/python-version-compare-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..0f1bcc0bc6732f973ee8846f34a921ac51272aff --- /dev/null +++ b/recipes-devtools/xdevice/files/python-version-compare-fix.patch @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +Handle compare with Python 3.10 and newer. + +Signed-off-by: Esben Haabendal <esben@geanix.com> +Upstream-Status: Pending + +diff --git a/src/xdevice/_core/command/console.py b/src/xdevice/_core/command/console.py +index 9e448ba8d7e3..122da3c974fb 100644 +--- a/src/xdevice/_core/command/console.py ++++ b/src/xdevice/_core/command/console.py +@@ -22,6 +22,7 @@ import platform + import signal + import sys + import threading ++from packaging import version + + from _core.config.config_manager import UserConfigManager + from _core.constants import SchedulerType +@@ -84,7 +85,7 @@ class Console(object): + """ + Main xDevice console providing user with the interface to interact + """ +- if sys.version < '3.7': ++ if version.parse(sys.version.split(' ')[0]) < version.parse('3.7'): + LOG.error("Please use python 3.7 or higher version to " + "start project") + sys.exit(0) +diff --git a/src/xdevice/_core/report/__main__.py b/src/xdevice/_core/report/__main__.py +index 33d3a492029c..0a9124f8c2e1 100644 +--- a/src/xdevice/_core/report/__main__.py ++++ b/src/xdevice/_core/report/__main__.py +@@ -19,6 +19,7 @@ + import os + import sys + import time ++from packaging import version + + from _core.logger import platform_logger + from _core.report.reporter_helper import ExecInfo +@@ -29,7 +30,7 @@ LOG = platform_logger("ReportMain") + + + def main_report(): +- if sys.version < '3.7': ++ if version.parse(sys.version.split(' ')[0]) < version.parse('3.7'): + LOG.error("Please use python 3.7 or higher version to start " + "project") + return diff --git a/recipes-devtools/xdevice/xdevice-extension_2.11.0.1091.bb b/recipes-devtools/xdevice/xdevice-extension_2.11.0.1091.bb new file mode 100644 index 0000000000000000000000000000000000000000..eb8376e61b9989e08c090d982891e9471ed158bf --- /dev/null +++ b/recipes-devtools/xdevice/xdevice-extension_2.11.0.1091.bb @@ -0,0 +1,18 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +DESCRIPTION = "XDevice, a core module of the OpenHarmony test framework, provides services on which test case execution depends." +SUMMARY = "Tool for remote test execution in OpenHarmony test framework" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://../LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +SRC_URI += "git://gitee.com/openharmony/test_xdevice.git;protocol=https;branch=OpenHarmony-3.0-LTS;rev=b0845abc4da7c5deef3335f7052ec9fa29ef4c34;lfs=0" +S = "${WORKDIR}/git/extension" + +inherit setuptools3 + +RDEPENDS:${PN} += "python3-setuptools" + +BBCLASSEXTEND = "native nativesdk" diff --git a/recipes-devtools/xdevice/xdevice_2.11.0.1091.bb b/recipes-devtools/xdevice/xdevice_2.11.0.1091.bb new file mode 100644 index 0000000000000000000000000000000000000000..786f345c9ab6f3f8d680a7af9e619a8bab6d1c11 --- /dev/null +++ b/recipes-devtools/xdevice/xdevice_2.11.0.1091.bb @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +DESCRIPTION = "XDevice, a core module of the OpenHarmony test framework, provides services on which test case execution depends." +SUMMARY = "Tool for remote test execution in OpenHarmony test framework" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +SRC_URI += "git://gitee.com/openharmony/test_xdevice.git;protocol=https;branch=OpenHarmony-3.0-LTS;rev=b0845abc4da7c5deef3335f7052ec9fa29ef4c34;lfs=0" +S = "${WORKDIR}/git" + +SRC_URI += "file://python-version-compare-fix.patch" + +inherit setuptools3 + +RDEPENDS:${PN} += "python3-setuptools python3-packaging xdevice-extension" + +BBCLASSEXTEND = "native nativesdk"