summaryrefslogtreecommitdiff
path: root/upstream-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-django/run-ptest
blob: a7fe08cc83ce65a0ec120ac8feea79430848e098 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
useradd tester || echo test user exists already

# We need $(pwd), because some tests import modules from the actual tests folder
# Also, there is one module in the docs/_ext folder that is imported, and that
# module accesses other modules by a relative path to itself.
export PYTHONPATH=$(pwd):$(pwd)/docs/_ext:$PYTHONPATH

cd tests

su tester -c "./runtests.py --noinput -v 2" 2>&1 | \
     tee ../testoutput.log | \
     sed -e '/\.\.\. ok/ s/^/PASS: /g' \
         -e '/\.\.\. \(ERROR\|FAIL\)/ s/^/FAIL: /g' \
         -e '/\.\.\. skipped/ s/^/SKIP: /g' \
         -e 's/ \.\.\. ok//g' \
         -e 's/ \.\.\. ERROR//g' \
         -e 's/ \.\.\. FAIL//g' \
         -e 's/ \.\.\. skipped//g'