diff options
3 files changed, 8 insertions, 2 deletions
diff --git a/meta/recipes-devtools/python/python3-cryptography/check-memfree.py b/meta/recipes-devtools/python/python3-cryptography/check-memfree.py index c111a9074c..ed680d8d5b 100755 --- a/meta/recipes-devtools/python/python3-cryptography/check-memfree.py +++ b/meta/recipes-devtools/python/python3-cryptography/check-memfree.py | |||
@@ -4,7 +4,7 @@ import sys | |||
4 | meminfo = dict((i.split()[0].rstrip(':'),int(i.split()[1])) for i in open('/proc/meminfo').readlines()) | 4 | meminfo = dict((i.split()[0].rstrip(':'),int(i.split()[1])) for i in open('/proc/meminfo').readlines()) |
5 | mem_free = meminfo['MemTotal']/1024./1024. | 5 | mem_free = meminfo['MemTotal']/1024./1024. |
6 | if mem_free < 2.: | 6 | if mem_free < 2.: |
7 | raise RuntimeError("Insufficient free memory({:.3f}): requires > 2 GB".format(mem_free)) | 7 | print("Insufficient free memory({:.3f}): requires > 2 GB".format(mem_free)) |
8 | sys.exit(1) | 8 | sys.exit(1) |
9 | else: | 9 | else: |
10 | print("Free memory: {:.3f} GB".format(mem_free)) | 10 | print("Free memory: {:.3f} GB".format(mem_free)) |
diff --git a/meta/recipes-devtools/python/python3-cryptography/run-ptest b/meta/recipes-devtools/python/python3-cryptography/run-ptest index 3089df8781..fe191a5dc4 100644 --- a/meta/recipes-devtools/python/python3-cryptography/run-ptest +++ b/meta/recipes-devtools/python/python3-cryptography/run-ptest | |||
@@ -1,4 +1,9 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | |||
2 | if ./check-memfree.py; then | 3 | if ./check-memfree.py; then |
3 | pytest -vvvv tests/ -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}}' | 4 | # Skip the bench test module, we don't yet have pytest3-benchmark in core |
5 | # and these are more benchmarks than unit tests. | ||
6 | pytest --automake -k 'not bench' | ||
7 | else | ||
8 | echo "SKIP: crytography.not_enough_memory" | ||
4 | fi | 9 | fi |
diff --git a/meta/recipes-devtools/python/python3-cryptography_39.0.2.bb b/meta/recipes-devtools/python/python3-cryptography_39.0.2.bb index 4b591bc59b..449e3ba1bc 100644 --- a/meta/recipes-devtools/python/python3-cryptography_39.0.2.bb +++ b/meta/recipes-devtools/python/python3-cryptography_39.0.2.bb | |||
@@ -43,6 +43,7 @@ RDEPENDS:${PN}-ptest += " \ | |||
43 | ${PYTHON_PN}-pretend \ | 43 | ${PYTHON_PN}-pretend \ |
44 | ${PYTHON_PN}-psutil \ | 44 | ${PYTHON_PN}-psutil \ |
45 | ${PYTHON_PN}-pytest \ | 45 | ${PYTHON_PN}-pytest \ |
46 | ${PYTHON_PN}-unittest-automake-output \ | ||
46 | ${PYTHON_PN}-pytest-subtests \ | 47 | ${PYTHON_PN}-pytest-subtests \ |
47 | ${PYTHON_PN}-pytz \ | 48 | ${PYTHON_PN}-pytz \ |
48 | " | 49 | " |