From ac867f6fa6273ca3361cc6b5b07ca23ef6d25ae6 Mon Sep 17 00:00:00 2001 From: Zang Ruochen Date: Mon, 30 Mar 2020 13:56:14 +0800 Subject: python3-sqlparse: Enable ptest Signed-off-by: Zang Ruochen Signed-off-by: Khem Raj --- meta-python/recipes-devtools/python/python-sqlparse.inc | 16 ++++++++++++++-- .../recipes-devtools/python/python3-sqlparse/run-ptest | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 meta-python/recipes-devtools/python/python3-sqlparse/run-ptest (limited to 'meta-python') diff --git a/meta-python/recipes-devtools/python/python-sqlparse.inc b/meta-python/recipes-devtools/python/python-sqlparse.inc index 473232d652..45a1e56775 100644 --- a/meta-python/recipes-devtools/python/python-sqlparse.inc +++ b/meta-python/recipes-devtools/python/python-sqlparse.inc @@ -4,7 +4,9 @@ SECTION = "devel/python" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://LICENSE;md5=2b136f573f5386001ea3b7b9016222fc" -SRC_URI += "file://0001-sqlparse-change-shebang-to-python3.patch" +SRC_URI += "file://0001-sqlparse-change-shebang-to-python3.patch \ + file://run-ptest \ + " SRC_URI[md5sum] = "423047887a3590b04dd18f8caf843a2f" SRC_URI[sha256sum] = "e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d12c548" @@ -12,4 +14,14 @@ SRC_URI[sha256sum] = "e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d export BUILD_SYS export HOST_SYS -inherit pypi +inherit pypi ptest + +RDEPENDS_${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unixadmin \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} diff --git a/meta-python/recipes-devtools/python/python3-sqlparse/run-ptest b/meta-python/recipes-devtools/python/python3-sqlparse/run-ptest new file mode 100644 index 0000000000..40c284799d --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-sqlparse/run-ptest @@ -0,0 +1,2 @@ +#!/bin/sh +pytest -- cgit v1.2.3-54-g00ecf