Unified SDK for OpenStack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

post_test_hook.sh 1.1KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash
  2. #
  3. # This is a script that kicks off a series of functional tests against a
  4. # OpenStack devstack cloud. This script is intended to work as a gate
  5. # in project-config for the Python SDK.
  6. DIR=$(cd $(dirname "$0") && pwd)
  7. echo "Running SDK functional test suite"
  8. sudo -H -u stack -i <<!
  9. export OS_CLOUD=devstack-admin
  10. echo 'Running tests with:'
  11. cat /etc/openstack/clouds.yaml
  12. cd ${DIR}
  13. echo '=functional=============================================='
  14. if [[ -n "$1" ]]; then
  15. tox -e functional -- $1
  16. else
  17. tox -e functional
  18. fi
  19. FUNCTIONAL_RESULT=\$?
  20. echo '=examples================================================'
  21. tox -e examples
  22. EXAMPLES_RESULT=\$?
  23. echo '========================================================='
  24. echo "Functional test result: \$FUNCTIONAL_RESULT"
  25. echo "Examples test result: \$EXAMPLES_RESULT"
  26. test \$FUNCTIONAL_RESULT == 0 -a \$EXAMPLES_RESULT == 0
  27. !
  28. # TODO(thowe) For now we are going to ignore tests failures
  29. # It is easier to change this script than the gate. The magic
  30. # string fro this script should probably specify the -e option
  31. # so the script will fail immediately if a command fails.
  32. exit 0