diff --git a/.travis/downstream.d/aws-encryption-sdk.sh b/.travis/downstream.d/aws-encryption-sdk.sh new file mode 100755 index 000000000000..8efd1930b537 --- /dev/null +++ b/.travis/downstream.d/aws-encryption-sdk.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +case "${1}" in + install) + git clone --depth=1 https://github.com/awslabs/aws-encryption-sdk-python + cd aws-encryption-sdk-python + pip install -r test/requirements.txt + pip install -e . + ;; + run) + cd aws-encryption-sdk-python + pytest -m local test/ + ;; + *) + exit + ;; +esac diff --git a/.travis/downstream.d/certbot-josepy.sh b/.travis/downstream.d/certbot-josepy.sh new file mode 100755 index 000000000000..9e35d138c724 --- /dev/null +++ b/.travis/downstream.d/certbot-josepy.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +case "${1}" in + install) + git clone --depth=1 https://github.com/certbot/josepy + cd josepy + pip install -e ".[tests]" + ;; + run) + cd josepy + pytest src + ;; + *) + exit + ;; +esac diff --git a/.travis/downstream.d/certbot.sh b/.travis/downstream.d/certbot.sh new file mode 100755 index 000000000000..c6d4bdffaf2b --- /dev/null +++ b/.travis/downstream.d/certbot.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +case "${1}" in + install) + git clone --depth=1 https://github.com/certbot/certbot + cd certbot + pip install pytest pytest-mock mock + pip install -e acme + pip install -e . + ;; + run) + cd certbot + pytest certbot/tests + pytest acme + ;; + *) + exit + ;; +esac diff --git a/.travis/downstream.d/downstream-template.sh b/.travis/downstream.d/downstream-template.sh new file mode 100755 index 000000000000..48c5a810f244 --- /dev/null +++ b/.travis/downstream.d/downstream-template.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +case "${1}" in + install) + # Download source and install requirements + ;; + run) + # Run tests + ;; + *) + exit 1 + ;; +esac diff --git a/.travis/downstream.d/dynamodb-encryption-sdk.sh b/.travis/downstream.d/dynamodb-encryption-sdk.sh new file mode 100755 index 000000000000..593cb181510a --- /dev/null +++ b/.travis/downstream.d/dynamodb-encryption-sdk.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +case "${1}" in + install) + git clone --depth=1 https://github.com/awslabs/aws-dynamodb-encryption-python + cd aws-dynamodb-encryption-python + pip install -r test/requirements.txt + pip install -e . + ;; + run) + cd aws-dynamodb-encryption-python + pytest -m "local and not slow and not veryslow and not nope" + ;; + *) + exit + ;; +esac diff --git a/.travis/downstream.d/paramiko.sh b/.travis/downstream.d/paramiko.sh new file mode 100755 index 000000000000..ee4e270f6f8d --- /dev/null +++ b/.travis/downstream.d/paramiko.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +case "${1}" in + install) + git clone --depth=1 https://github.com/paramiko/paramiko + cd paramiko + pip install -e . + pip install -r dev-requirements.txt + ;; + run) + cd paramiko + inv test + ;; + *) + exit + ;; +esac diff --git a/.travis/downstream.d/pyopenssl.sh b/.travis/downstream.d/pyopenssl.sh new file mode 100755 index 000000000000..b95bb28012e8 --- /dev/null +++ b/.travis/downstream.d/pyopenssl.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +case "${1}" in + install) + git clone --depth=1 https://github.com/pyca/pyopenssl + cd pyopenssl + pip install -e ".[test]" + ;; + run) + cd pyopenssl + pytest tests + ;; + *) + exit 1 + ;; +esac diff --git a/.travis/downstream.d/twisted.sh b/.travis/downstream.d/twisted.sh new file mode 100755 index 000000000000..cb25027a805a --- /dev/null +++ b/.travis/downstream.d/twisted.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +case "${1}" in + install) + git clone --depth=1 https://github.com/twisted/twisted + cd twisted + pip install -e .[tls,conch,http2] + ;; + run) + cd twisted + python -m twisted.trial src/twisted + ;; + *) + exit 1 + ;; +esac diff --git a/.travis/downstream.d/urllib3.sh b/.travis/downstream.d/urllib3.sh new file mode 100755 index 000000000000..8442d1e79897 --- /dev/null +++ b/.travis/downstream.d/urllib3.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +case "${1}" in + install) + git clone --depth 1 https://github.com/shazow/urllib3 + cd urllib3 + pip install -r ./dev-requirements.txt + pip install -e ".[socks]" + ;; + run) + cd urllib3 + pytest test + ;; + *) + exit 1 + ;; +esac diff --git a/.travis/run.sh b/.travis/run.sh index 572b9a4d85e5..898e2240a2e1 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -26,65 +26,11 @@ source ~/.venv/bin/activate if [ -n "${TOXENV}" ]; then tox -- --wycheproof-root=$HOME/wycheproof else + downstream_script = "${0}/downstream.d/${DOWNSTREAM}.sh" + if [ ! -x $downstream_script ]; then + exit 1 + fi + $(downstream_script) install pip install . - case "${DOWNSTREAM}" in - pyopenssl) - git clone --depth=1 https://github.com/pyca/pyopenssl - cd pyopenssl - pip install -e ".[test]" - pytest tests - ;; - twisted) - git clone --depth=1 https://github.com/twisted/twisted - cd twisted - pip install -e .[tls,conch,http2] - python -m twisted.trial src/twisted - ;; - paramiko) - git clone --depth=1 https://github.com/paramiko/paramiko - cd paramiko - pip install -e . - pip install -r dev-requirements.txt - inv test - ;; - aws-encryption-sdk) - git clone --depth=1 https://github.com/awslabs/aws-encryption-sdk-python - cd aws-encryption-sdk-python - pip install -r test/requirements.txt - pip install -e . - pytest -m local test/ - ;; - dynamodb-encryption-sdk) - git clone --depth=1 https://github.com/awslabs/aws-dynamodb-encryption-python - cd aws-dynamodb-encryption-python - pip install -r test/requirements.txt - pip install -e . - pytest -m "local and not slow and not veryslow and not nope" - ;; - certbot) - git clone --depth=1 https://github.com/certbot/certbot - cd certbot - pip install pytest pytest-mock mock - pip install -e acme - pip install -e . - pytest certbot/tests - pytest acme - ;; - certbot-josepy) - git clone --depth=1 https://github.com/certbot/josepy - cd josepy - pip install -e ".[tests]" - pytest src - ;; - urllib3) - git clone --depth 1 https://github.com/shazow/urllib3 - cd urllib3 - pip install -r ./dev-requirements.txt - pip install -e ".[socks]" - pytest test - ;; - *) - exit 1 - ;; - esac + $(downstream_script) run fi