Skip to content

Commit

Permalink
reorganize downstream tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsb42-aws committed Aug 28, 2018
1 parent 3d0f333 commit 918298b
Show file tree
Hide file tree
Showing 10 changed files with 154 additions and 60 deletions.
17 changes: 17 additions & 0 deletions .travis/downstream.d/aws-encryption-sdk.sh
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions .travis/downstream.d/certbot-josepy.sh
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions .travis/downstream.d/certbot.sh
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions .travis/downstream.d/downstream-template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

case "${1}" in
install)
# Download source and install requirements
;;
run)
# Run tests
;;
*)
exit 1
;;
esac
17 changes: 17 additions & 0 deletions .travis/downstream.d/dynamodb-encryption-sdk.sh
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions .travis/downstream.d/paramiko.sh
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions .travis/downstream.d/pyopenssl.sh
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions .travis/downstream.d/twisted.sh
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions .travis/downstream.d/urllib3.sh
Original file line number Diff line number Diff line change
@@ -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
66 changes: 6 additions & 60 deletions .travis/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 918298b

Please sign in to comment.