poky/meta/recipes-devtools/python/python3-hypothesis/run-ptest
Tim Orling 47b361bf91 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>
2021-08-22 22:21:47 +01:00

762 B

#!/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}}'