chiark / gitweb /
Use os.path.join instead of adding strings more often
[fdroidserver.git] / jenkins-build
index dbdea777fc849bc03f7c63114499e7ad5a759d8d..4069d820d19df8c5251cf6ba3b1a66510f466e9e 100755 (executable)
@@ -47,32 +47,32 @@ cd $WORKSPACE/fdroidserver/getsig
 #------------------------------------------------------------------------------#
 # run local tests
 cd $WORKSPACE/tests
-./run-tests
+./run-tests ~jenkins/
 
 
 #------------------------------------------------------------------------------#
 # test building the source tarball
 cd $WORKSPACE
-python setup.py sdist
+python2 setup.py sdist
 
 
 #------------------------------------------------------------------------------#
 # test install using site packages
 cd $WORKSPACE
 rm -rf $WORKSPACE/env
-virtualenv --system-site-packages $WORKSPACE/env
+virtualenv --python=python2 --system-site-packages $WORKSPACE/env
 . $WORKSPACE/env/bin/activate
 pip install -e $WORKSPACE
-python setup.py install
+python2 setup.py install
 
 # run tests in new pip+virtualenv install
 . $WORKSPACE/env/bin/activate
-fdroid=$WORKSPACE/env/bin/fdroid $WORKSPACE/tests/run-tests
+fdroid=$WORKSPACE/env/bin/fdroid $WORKSPACE/tests/run-tests ~jenkins/
 
 
 #------------------------------------------------------------------------------#
-# run pyflakes
-pyflakes fdroid makebuildserver fdroidserver/*.py setup.py
+# run git pre-commit hook for pep8, pyflakes, etc
+sh hooks/pre-commit
 
 
 #------------------------------------------------------------------------------#
@@ -81,7 +81,7 @@ pyflakes fdroid makebuildserver fdroidserver/*.py setup.py
 cd $WORKSPACE
 set +e
 # use the virtualenv python so pylint checks against its installed libs
-    PYTHONPATH=$WORKSPACE/.pylint-plugins python /usr/bin/pylint \
+    PYTHONPATH=$WORKSPACE/.pylint-plugins python2 /usr/bin/pylint \
         --output-format=parseable --reports=n \
         --load-plugins astng_hashlib \
         fdroidserver/*.py fdroid makebuildserver setup.py > $WORKSPACE/pylint.parseable