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>
This commit is contained in:
Tim Orling
2021-08-21 20:39:41 -07:00
committed by Richard Purdie
parent 34f595c6b4
commit 47b361bf91
5 changed files with 264 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
#!/bin/sh
# Upstream "fast" tests take about 5 minutes and currently do not run cleanly
# (tests/cover and tests/pytest)
# https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python/tests
# https://github.com/HypothesisWorks/hypothesis/blob/master/hypothesis-python/scripts/basic-test.sh#L18
#
# Instead we run two test suites imported from examples/
pytest -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}}'