mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
tests: switch to python3
This commit is contained in:
parent
a1703f1204
commit
24ad0418e3
@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||||
|
|
||||||
|
@ -51,10 +51,10 @@ cd $WORKSPACE/tests
|
|||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
# test building the source tarball, then installing it
|
# test building the source tarball, then installing it
|
||||||
cd $WORKSPACE
|
cd $WORKSPACE
|
||||||
python2 setup.py sdist
|
python3 setup.py sdist
|
||||||
|
|
||||||
rm -rf $WORKSPACE/env
|
rm -rf $WORKSPACE/env
|
||||||
virtualenv --python=python2 $WORKSPACE/env
|
virtualenv --python=python3 $WORKSPACE/env
|
||||||
. $WORKSPACE/env/bin/activate
|
. $WORKSPACE/env/bin/activate
|
||||||
pip install dist/fdroidserver-*.tar.gz
|
pip install dist/fdroidserver-*.tar.gz
|
||||||
|
|
||||||
@ -66,10 +66,10 @@ fdroid=$WORKSPACE/env/bin/fdroid $WORKSPACE/tests/run-tests $apksource
|
|||||||
# test install using install direct from git repo
|
# test install using install direct from git repo
|
||||||
cd $WORKSPACE
|
cd $WORKSPACE
|
||||||
rm -rf $WORKSPACE/env
|
rm -rf $WORKSPACE/env
|
||||||
virtualenv --python=python2 --system-site-packages $WORKSPACE/env
|
virtualenv --python=python3 --system-site-packages $WORKSPACE/env
|
||||||
. $WORKSPACE/env/bin/activate
|
. $WORKSPACE/env/bin/activate
|
||||||
pip install -e $WORKSPACE
|
pip install -e $WORKSPACE
|
||||||
python2 setup.py install
|
python3 setup.py install
|
||||||
|
|
||||||
# run tests in new pip+virtualenv install
|
# run tests in new pip+virtualenv install
|
||||||
fdroid=$WORKSPACE/env/bin/fdroid $WORKSPACE/tests/run-tests $apksource
|
fdroid=$WORKSPACE/env/bin/fdroid $WORKSPACE/tests/run-tests $apksource
|
||||||
@ -86,7 +86,7 @@ sh hooks/pre-commit
|
|||||||
cd $WORKSPACE
|
cd $WORKSPACE
|
||||||
set +e
|
set +e
|
||||||
# use the virtualenv python so pylint checks against its installed libs
|
# use the virtualenv python so pylint checks against its installed libs
|
||||||
PYTHONPATH=$WORKSPACE/.pylint-plugins python2 /usr/bin/pylint \
|
PYTHONPATH=$WORKSPACE/.pylint-plugins python3 /usr/bin/pylint \
|
||||||
--output-format=parseable --reports=n \
|
--output-format=parseable --reports=n \
|
||||||
--load-plugins astng_hashlib \
|
--load-plugins astng_hashlib \
|
||||||
fdroidserver/*.py fdroid makebuildserver setup.py > $WORKSPACE/pylint.parseable
|
fdroidserver/*.py fdroid makebuildserver setup.py > $WORKSPACE/pylint.parseable
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ fi
|
|||||||
|
|
||||||
# allow the location of python to be overridden
|
# allow the location of python to be overridden
|
||||||
if [ -z $python ]; then
|
if [ -z $python ]; then
|
||||||
python=python2
|
python=python3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -x # show each command as it is executed
|
set -x # show each command as it is executed
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user