Received: from heian.cn.fujitsu.com (heian.cn.fujitsu.com [183.91.158.132]) by mx.groups.io with SMTP id smtpd.web11.712.1586565558718297319 for ; Fri, 10 Apr 2020 17:39:19 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=SPF record not found (domain: cn.fujitsu.com, ip: 183.91.158.132, mailfrom: zangrc.fnst@cn.fujitsu.com) X-IronPort-AV: E=Sophos;i="5.72,368,1580745600"; d="scan'208";a="88837622" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 11 Apr 2020 08:39:15 +0800 Received: from G08CNEXMBPEKD06.g08.fujitsu.local (unknown [10.167.33.206]) by cn.fujitsu.com (Postfix) with ESMTP id 0D4F250A999E for ; Sat, 11 Apr 2020 08:28:46 +0800 (CST) Received: from G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD06.g08.fujitsu.local (10.167.33.206) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 11 Apr 2020 08:39:11 +0800 Received: from localhost.local (10.167.225.81) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 11 Apr 2020 08:39:12 +0800 From: "zangrc" To: Subject: [oe] [meta-python] [PATCH] python3-pyserial: Enable ptest Date: Sat, 11 Apr 2020 08:42:04 +0800 Message-ID: <20200411004205.23402-4-zangrc.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200411004205.23402-1-zangrc.fnst@cn.fujitsu.com> References: <20200411004205.23402-1-zangrc.fnst@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.225.81] X-yoursite-MailScanner-ID: 0D4F250A999E.AD8C4 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: zangrc.fnst@cn.fujitsu.com X-Spam-Status: No Content-Transfer-Encoding: 8bit Content-Type: text/plain Signed-off-by: Zang Ruochen --- .../python/python3-pyserial/run-ptest | 3 +++ .../python/python3-pyserial_3.4.bb | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 meta-python/recipes-devtools/python/python3-pyserial/run-ptest diff --git a/meta-python/recipes-devtools/python/python3-pyserial/run-ptest b/meta-python/recipes-devtools/python/python3-pyserial/run-ptest new file mode 100644 index 000000000..5cec71169 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pyserial/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest diff --git a/meta-python/recipes-devtools/python/python3-pyserial_3.4.bb b/meta-python/recipes-devtools/python/python3-pyserial_3.4.bb index eee8eb2d1..d65c9a88b 100644 --- a/meta-python/recipes-devtools/python/python3-pyserial_3.4.bb +++ b/meta-python/recipes-devtools/python/python3-pyserial_3.4.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d476d94926db6e0008a5b3860d1f5c0d" SRC_URI[md5sum] = "ed6183b15519a0ae96675e9c3330c69b" SRC_URI[sha256sum] = "6e2d401fdee0eab996cf734e67773a0143b932772ca8b42451440cfed942c627" -inherit pypi setuptools3 +inherit pypi setuptools3 ptest do_install_append() { rm -f ${D}${bindir}/miniterm.py @@ -47,3 +47,16 @@ RDEPENDS_${PN} = "\ " BBCLASSEXTEND = "native nativesdk" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS_${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/test + cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/ +} -- 2.20.1