aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>2020-04-21 22:12:33 +0800
committerKhem Raj <raj.khem@gmail.com>2020-04-21 07:14:06 -0700
commit075cf6ded05b26a94bbe51c205d3d8e34e2573af (patch)
tree89cebdb52b38fa2821031a2dbf411caf4952b88b
parent7e372d1676c2afba3f248db6459a03a30a63ae9f (diff)
downloadmeta-openembedded-contrib-075cf6ded05b26a94bbe51c205d3d8e34e2573af.tar.gz
python3-jsmin: Enable ptest
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-python/recipes-devtools/python/python3-jsmin/run-ptest3
-rw-r--r--meta-python/recipes-devtools/python/python3-jsmin_2.2.2.bb14
2 files changed, 16 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/python/python3-jsmin/run-ptest b/meta-python/recipes-devtools/python/python3-jsmin/run-ptest
new file mode 100644
index 0000000000..cbcfffda5b
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-jsmin/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+python3 test.py
diff --git a/meta-python/recipes-devtools/python/python3-jsmin_2.2.2.bb b/meta-python/recipes-devtools/python/python3-jsmin_2.2.2.bb
index ab657e6f08..9b7a824087 100644
--- a/meta-python/recipes-devtools/python/python3-jsmin_2.2.2.bb
+++ b/meta-python/recipes-devtools/python/python3-jsmin_2.2.2.bb
@@ -4,8 +4,20 @@ SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3a3301ce2ad647e172f4a1016c67324d"
-inherit setuptools3 pypi
+inherit setuptools3 pypi ptest
SRC_URI[md5sum] = "00e7a3179a4591aab2ee707b3214e2fd"
SRC_URI[sha256sum] = "b6df99b2cd1c75d9d342e4335b535789b8da9107ec748212706ef7bbe5c2553b"
BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI += " \
+ file://run-ptest \
+"
+
+RDEPENDS_${PN}-ptest += " \
+ ${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+ cp -f ${S}/jsmin/test.py ${D}${PTEST_PATH}/
+}