summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3-hypothesis/run-ptest
diff options
context:
space:
mode:
authorTim Orling <ticotimo@gmail.com>2021-08-21 20:39:41 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-22 22:21:47 +0100
commit47b361bf915811b87b79f902778595455f676a69 (patch)
tree0e958a330dd899d3c142f0a00d10e8c832d0a6f0 /meta/recipes-devtools/python/python3-hypothesis/run-ptest
parent34f595c6b41de9c4be8b3fc73d5ee0a3e89f627c (diff)
downloadpoky-47b361bf915811b87b79f902778595455f676a69.tar.gz
python3-hypothesis: enable ptest
The upstream "fast" tests (tests/cover and tests/pytest) take over 5 minutes to run and do not run cleanly. They also add dependency on python3-pexpect and python3-ptyprocess (currently in meta-python). The tests are also not included in the pypi tarball, so it would require use of git fetcher and other invasive changes to the recipe, including dropping the pypi inherit. Instead, use two test suites from examples/ References: https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python/tests https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python/examples (From OE-Core rev: 1c7f6f444fdcb859a37d3b51a8d47260834d01db) Signed-off-by: Tim Orling <timothy.t.orling@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3-hypothesis/run-ptest')
-rw-r--r--meta/recipes-devtools/python/python3-hypothesis/run-ptest10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-hypothesis/run-ptest b/meta/recipes-devtools/python/python3-hypothesis/run-ptest
new file mode 100644
index 0000000000..8d44d7c49a
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-hypothesis/run-ptest
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3# Upstream "fast" tests take about 5 minutes and currently do not run cleanly
4# (tests/cover and tests/pytest)
5# https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python/tests
6# https://github.com/HypothesisWorks/hypothesis/blob/master/hypothesis-python/scripts/basic-test.sh#L18
7#
8# Instead we run two test suites imported from examples/
9
10pytest -o log_cli=true -o log_cli_level=INFO | 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}}'