diff options
author | Zang Ruochen <zangrc.fnst@cn.fujitsu.com> | 2020-06-28 16:45:15 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-06-29 08:22:57 -0700 |
commit | 835200ff1679ae792d52a4ca7c4f3585089dc611 (patch) | |
tree | e6034ec9729c701eda92d7ccc906e2029edf0f85 | |
parent | e8cb41c0866568fa31271ed8bfe96b0335a9456f (diff) | |
download | meta-openembedded-835200ff1679ae792d52a4ca7c4f3585089dc611.tar.gz |
python3-ansicolors: Enable ptest
Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Acked-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-python/recipes-devtools/python/python3-ansicolors/run-ptest | 3 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-ansicolors_1.1.8.bb | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/python/python3-ansicolors/run-ptest b/meta-python/recipes-devtools/python/python3-ansicolors/run-ptest new file mode 100644 index 0000000000..7dc3ef32be --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-ansicolors/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | pytest -o log_cli=true -o log_cli_level=INFO test.py| sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' | ||
diff --git a/meta-python/recipes-devtools/python/python3-ansicolors_1.1.8.bb b/meta-python/recipes-devtools/python/python3-ansicolors_1.1.8.bb index 9ba710cb78..a9ebebeef9 100644 --- a/meta-python/recipes-devtools/python/python3-ansicolors_1.1.8.bb +++ b/meta-python/recipes-devtools/python/python3-ansicolors_1.1.8.bb | |||
@@ -7,6 +7,18 @@ SRC_URI[sha256sum] = "99f94f5e3348a0bcd43c82e5fc4414013ccc19d70bd939ad71e0133ce9 | |||
7 | 7 | ||
8 | PYPI_PACKAGE_EXT = "zip" | 8 | PYPI_PACKAGE_EXT = "zip" |
9 | 9 | ||
10 | inherit pypi setuptools3 | 10 | inherit pypi setuptools3 ptest |
11 | |||
12 | SRC_URI += " \ | ||
13 | file://run-ptest \ | ||
14 | " | ||
15 | |||
16 | RDEPENDS_${PN}-ptest += " \ | ||
17 | ${PYTHON_PN}-pytest \ | ||
18 | " | ||
19 | |||
20 | do_install_ptest() { | ||
21 | cp -f ${S}/test/test.py ${D}${PTEST_PATH}/ | ||
22 | } | ||
11 | 23 | ||
12 | BBCLASSEXTEND = "native nativesdk" | 24 | BBCLASSEXTEND = "native nativesdk" |