diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2026-01-16 16:33:09 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2026-01-16 09:39:26 -0800 |
| commit | a1537e21289ec8616656dc6e575a25f5e2e20649 (patch) | |
| tree | 5e87c5df8ce41a8495788e15dde4bc2802ab2935 /meta-python/recipes-devtools/python/python3-django/run-ptest | |
| parent | 6c03c47febee3b39d51a35dbdfcb9b24afb95715 (diff) | |
| download | meta-openembedded-a1537e21289ec8616656dc6e575a25f5e2e20649.tar.gz | |
python3-django: add ptest support
Execute the standard, non-selenium tests. The execution is
on the slower side: on my idle machine, KVM enabled it takes
a bit more than 2.5 minutes to execute it (executing tests with
4 threads parallel, 1/core, the default configuration). If the machine is
under load, it easily grows to over 10 minutes.
Added two backported patches for Django 5.2 to fix some tests that
would otherwise fail:
0001-Fix-test_strip_tags-test.patch: tag stripping tests failed due to
changed Python behavior
0001-fix-test_msgfmt_error_including_non_ascii-test.patch: tests were
updated to work with msgfmt 0.25
Most of the skipped tests require some specific database backend
(Postgres, MySQL, Oracle...) or are Selenium tests.
When the default parallelism is used for the execution, the package
needs 3GB RAM at least.
The output is very long (the suite contains way over 15k tests),
so I omit the example output here.
The current summary (for v5.2.9):
Ran 18121 tests in 140.891s
OK (skipped=1394, expected failures=5)
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-django/run-ptest')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-django/run-ptest | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-django/run-ptest b/meta-python/recipes-devtools/python/python3-django/run-ptest new file mode 100644 index 0000000000..dd257cc843 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-django/run-ptest | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | useradd tester || echo test user exists already | ||
| 3 | |||
| 4 | # We need $(pwd), because some tests import modules from the actual tests folder | ||
| 5 | # Also, there is one module in the docs/_ext folder that is imported, and that | ||
| 6 | # module accesses other modules by a relative path to itself. | ||
| 7 | export PYTHONPATH=$(pwd):$(pwd)/docs/_ext:$PYTHONPATH | ||
| 8 | |||
| 9 | cd tests | ||
| 10 | |||
| 11 | su tester -c "./runtests.py --noinput -v 2" 2>&1 | \ | ||
| 12 | tee ../testoutput.log | \ | ||
| 13 | sed -e '/\.\.\. ok/ s/^/PASS: /g' \ | ||
| 14 | -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' \ | ||
| 15 | -e '/\.\.\. skipped/ s/^/SKIP: /g' \ | ||
| 16 | -e 's/ \.\.\. ok//g' \ | ||
| 17 | -e 's/ \.\.\. ERROR//g' \ | ||
| 18 | -e 's/ \.\.\. FAIL//g' \ | ||
| 19 | -e 's/ \.\.\. skipped//g' | ||
