runtests_py3.sh 703 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. ls -l /
  3. echo "============== ENVIRONMENT ============="
  4. /usr/bin/env
  5. echo "============== END ENVIRONMENT ============="
  6. if [ -n "$REPO" -a -n "$BRANCH" ]; then
  7. git remote rm proposed || true
  8. git gc --auto
  9. git remote add proposed "$REPO"
  10. GIT_TRACE=1 GIT_CURL_VERBOSE=1 git fetch proposed
  11. git checkout origin/master
  12. git config --global user.email "you@example.com"
  13. git config --global user.name "Your Name"
  14. git merge --no-ff "proposed/$BRANCH" -m "Merge PR"
  15. echo "Running tests for branch $BRANCH of repo $REPO"
  16. echo "Last commits:"
  17. git --no-pager log -2
  18. fi
  19. sed -i -e "s|#!/usr/bin/env python|#!/usr/bin/env python3|" pagure/hooks/files/hookrunner
  20. pytest-3 -n auto ${TESTCASE:-tests/}