diff options
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' | ||
