From 4d50e35c17ecedf64eb3e322e5ed22909f114847 Mon Sep 17 00:00:00 2001 From: Lukas Zachar Date: Tue, 16 Jan 2024 14:30:12 +0100 Subject: [PATCH] Add tmt gating plan Cherry-picked from python3.11-cryptography 4d724274b91ec8164f3fd848eb72f76d512ced45 https://gitlab.com/redhat/centos-stream/rpms/python3.11-cryptography/-/commit/4d724274b91ec8164f3fd848eb72f76d512ced45 Amended changes from python3.11-cryptography 9f5f27800b672426a33d9995ef34bb2208c6cf52 https://gitlab.com/redhat/centos-stream/rpms/python3.11-cryptography/-/commit/9f5f27800b672426a33d9995ef34bb2208c6cf52 Co-Authored-By: Charalampos Stratakis --- .fmf/version | 1 + gating.yaml | 7 +++++++ plan.fmf | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 plan.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..a77f895 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy + +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/plan.fmf b/plan.fmf new file mode 100644 index 0000000..98e1550 --- /dev/null +++ b/plan.fmf @@ -0,0 +1,51 @@ +execute: + how: tmt +discover: + how: shell + dist-git-source: true + tests: + - name: bundled tests - Prepare part + require: + - python3.12-pytest + - python3.12-cryptography + - python3.12-pip + test: | + cd $(dirname $TMT_SOURCE_DIR/cryptography-*/tests) && + rm -rf tests/hypothesis/ tests/test_fernet.py \ + tests/hazmat/primitives/test_scrypt.py && + cat $TMT_TREE/conftest-skipper.py >> tests/conftest.py && + sed -i -e 's/ --benchmark-disable//' pyproject.toml && + pip3.12 install pytz==2022.7.1 pytest-subtests==0.11.0 + - name: unittests-basic + test: | + cd $(dirname $TMT_SOURCE_DIR/cryptography-*/tests) && + PYTHONPATH=./vectors pytest-3.12 tests/test_*.py + - name: unittests-x509 + test: | + cd $(dirname $TMT_SOURCE_DIR/cryptography-*/tests) && + PYTHONPATH=./vectors OPENSSL_ENABLE_SHA1_SIGNATURES=yes pytest-3.12 tests/x509/ + - name: unittests-hazmat + test: | + cd $(dirname $TMT_SOURCE_DIR/cryptography-*/tests) && + PYTHONPATH=./vectors pytest-3.12 -k 'not test_openssl_memleak' tests/hazmat/backends/ tests/hazmat/bindings/ + - name: unittests-primitives-aead + test: | + cd $(dirname $TMT_SOURCE_DIR/cryptography-*/tests) && + PYTHONPATH=./vectors pytest-3.12 tests/hazmat/primitives/test_aead.py + - name: unittests-primitives-aes + test: | + cd $(dirname $TMT_SOURCE_DIR/cryptography-*/tests) && + PYTHONPATH=./vectors pytest-3.12 tests/hazmat/primitives/test_aes.py::TestAESModeCBC \ + tests/hazmat/primitives/test_aes.py::TestAESModeCTR \ + tests/hazmat/primitives/test_aes_gcm.py::TestAESModeGCM + - name: unittests-primitives-a-e + test: | + cd $(dirname $TMT_SOURCE_DIR/cryptography-*/tests) && + PYTHONPATH=./vectors pytest-3.12 tests/hazmat/primitives/test_arc4.py \ + tests/hazmat/primitives/test_asym_utils.py \ + tests/hazmat/primitives/test_[b-e]*.py + - name: unittests-primitives-f-z + test: | + cd $(dirname $TMT_SOURCE_DIR/cryptography-*/tests) && + PYTHONPATH=./vectors OPENSSL_ENABLE_SHA1_SIGNATURES=yes pytest-3.12 tests/hazmat/primitives/test_[f-z]*.py \ + tests/hazmat/primitives/twofactor