Guest User

Untitled

a guest
Jan 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. #Clean everything like a brand new checkout
  2. #Don't remove "jenkins-upstream" directory
  3. if test -t 1 ; then
  4. echo "stdout is a tty. Are you sure you want to continue? This operation will clean any uncommitted files."
  5. read -p "CTRL-C to exit. Enter to continue:"
  6. fi
  7.  
  8. git clean -dxf -e "jenkins-upstream"
  9.  
  10. #Unlink any current development d
  11. # echo `python setup.py develop -u`
  12.  
  13. #if EPD_INSTALL path is given then use it first
  14. if [ -n "${EPD_INSTALL}" ]; then
  15. export PATH=${EPD_INSTALL}/bin:$PATH
  16. fi
  17.  
  18. #if WORKSPACE is not given then set it to '.'
  19. if [ -z "${WORKSPACE}" ]; then
  20. export WORKSPACE=`pwd`
  21. fi
  22.  
  23. #We must set the PYTHONPATH env variable for a local install
  24. export PYTHONPATH="${WORKSPACE}/install/lib/python2.7/site-packages":"$PYTHONPATH"
  25.  
  26. #If dependant projects have been built then intall the eggs into a local prefix
  27. if [ -d "${WORKSPACE}/jenkins-upstream/" ]; then
  28. egginst --prefix="${WORKSPACE}/install" "${WORKSPACE}/jenkins-upstream/"/*.egg
  29.  
  30. fi
  31.  
  32. ###################################################################
  33. ##Choose one of the following #####################################
  34.  
  35. #Build this project in-place for the tests to run
  36. python setup.py build_ext --inplace
  37.  
  38. # OR ##############################################################
  39.  
  40. #build the python egg for this project
  41. #python setup.py bdist_egg
  42.  
  43. #Install project to a local install
  44. #egginst --prefix="${WORKSPACE}/install" "${WORKSPACE}/dist/"/*.egg
  45.  
  46. #Change to a clean testing directory
  47. #We done want to import from the local python package.
  48. #cd "tests"
  49.  
  50. ###################################################################
  51. ###################################################################
  52.  
  53.  
  54. #Run the tests with coverage and unittest outputs
  55. nosetests tests --with-xunit --xunit-file="${WORKSPACE}/nosetests.xml" --with-coverage
  56.  
  57. #Convert the coverage to xml format
  58. coverage xml -o "${WORKSPACE}/coverage.xml"
  59.  
  60. #build the python egg for this project
  61. python setup.py bdist_egg
  62.  
  63. echo "Done!"
Add Comment
Please, Sign In to add comment