[v3] python3-cryptography: remove --benchmark-disable option

Message ID 20220608093120.1532299-1-mingli.yu@windriver.com
State Accepted, archived
Commit 7fdfa8504dcc9c15e957256c97b43eec5291216c
Headers show
Series [v3] python3-cryptography: remove --benchmark-disable option | expand

Commit Message

Yu, Mingli June 8, 2022, 9:31 a.m. UTC
From: Mingli Yu <mingli.yu@windriver.com>

The new version introduced below change, so remove the option
to avoid python3-pytest-benchmark rdepends to fix the gap.
496703c8 Refs #7079 -- added basic scaffholding for benchmarks (#7087)

Fixes:
  # ./run-ptest
  Free memory: 31.283 GB
  ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
  pytest: error: unrecognized arguments: --benchmark-disable
  inifile: /usr/lib/python3-cryptography/ptest/pyproject.toml
  rootdir: /usr/lib/python3-cryptography/ptest

Remove the case test_x509.py to avoid below failure:
 file /usr/lib64/python3-cryptography/ptest/tests/bench/test_x509.py, line 9
  def test_aki_public_bytes(benchmark):
 >       fixture 'benchmark' not found
 >       available fixtures: backend, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, disable_rsa_checks, doctesty
 >       use 'pytest --fixtures [testpath]' for help on them.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 meta/recipes-devtools/python/python3-cryptography_37.0.2.bb | 3 +++
 1 file changed, 3 insertions(+)

Comments

Luca Ceresoli June 9, 2022, 7:06 a.m. UTC | #1
Hi,

On Wed, 8 Jun 2022 17:31:20 +0800
"Yu, Mingli" <mingli.yu@windriver.com> wrote:

> From: Mingli Yu <mingli.yu@windriver.com>
> 
> The new version introduced below change, so remove the option
> to avoid python3-pytest-benchmark rdepends to fix the gap.
> 496703c8 Refs #7079 -- added basic scaffholding for benchmarks (#7087)
> 
> Fixes:
>   # ./run-ptest
>   Free memory: 31.283 GB
>   ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
>   pytest: error: unrecognized arguments: --benchmark-disable
>   inifile: /usr/lib/python3-cryptography/ptest/pyproject.toml
>   rootdir: /usr/lib/python3-cryptography/ptest
> 
> Remove the case test_x509.py to avoid below failure:
>  file /usr/lib64/python3-cryptography/ptest/tests/bench/test_x509.py, line 9
>   def test_aki_public_bytes(benchmark):
>  >       fixture 'benchmark' not found
>  >       available fixtures: backend, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, disable_rsa_checks, doctesty
>  >       use 'pytest --fixtures [testpath]' for help on them.  
> 
> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>

I currently see all patches at v1, and a patch has one v2 and two v3s.
This is confusing and chances are whatever I take for testing will be
wrong.

Could you please send the entire series as v4, updated at the
current state of the art and with all the changes discussed in previous
replies?

Thanks!

Patch

diff --git a/meta/recipes-devtools/python/python3-cryptography_37.0.2.bb b/meta/recipes-devtools/python/python3-cryptography_37.0.2.bb
index d7a720bf2b..470cf4388c 100644
--- a/meta/recipes-devtools/python/python3-cryptography_37.0.2.bb
+++ b/meta/recipes-devtools/python/python3-cryptography_37.0.2.bb
@@ -104,6 +104,9 @@  do_install_ptest() {
     install -D ${WORKDIR}/check-memfree.py ${D}${PTEST_PATH}/
     install -d ${D}${PTEST_PATH}/tests
     cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+    # remove test_x509.py as it needs benchmark and we don't
+    # want to introduce the benchmark dependency
+    rm -rf ${D}${PTEST_PATH}/tests/bench/test_x509.py
     install -d ${D}${PTEST_PATH}/tests/hazmat
     cp -rf ${S}/tests/hazmat/* ${D}${PTEST_PATH}/tests/hazmat/
     cp -r ${S}/pyproject.toml ${D}${PTEST_PATH}/