-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
testing: run test in simulated appengine environment #2145
Conversation
Let's only do this for one go version, and add a new travis instance for it. Otherwise our testing time will double, which would not be desirable. |
.travis.yml
Outdated
script: | ||
- if [[ "$TRAVIS_GO_VERSION" = 1.10* && "$GOARCH" != "386" ]]; then ./vet.sh || exit 1; fi | ||
- if [[ "$TRAVIS_GO_VERSION" = 1.9* ]]; then make testappengine || exit 1; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still doubles the amount of time it takes to run the tests, because it does them in series for 1.9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
....instead, let's add this to the "matrix" section above so we get a new instance for running only the appengine tests.
f17bbd8
to
2c3416d
Compare
install_gae.sh
Outdated
set -ex # Exit on error; debugging enabled. | ||
set -o pipefail # Fail a pipe if any sub-command fails. | ||
|
||
mkdir /tmp/sdk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mktemp -d
is the preferred way to create a temporary directory.
install_gae.sh
Outdated
@@ -0,0 +1,9 @@ | |||
#!/bin/bash | |||
|
|||
set -ex # Exit on error; debugging enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be a bad idea to put this into your environment. Since you are sourcing this file, it will affect everything from here on.
You could do things in a single chained command instead:
mkdir \
&& curl \
&& unzip \
&& export
install_gae.sh
Outdated
#!/bin/bash | ||
|
||
set -ex # Exit on error; debugging enabled. | ||
set -o pipefail # Fail a pipe if any sub-command fails. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no pipes in this file :) Same comment as above, though.
.travis.yml
Outdated
|
||
script: | ||
- if [[ "$TRAVIS_GO_VERSION" = 1.10* && "$GOARCH" != "386" ]]; then ./vet.sh || exit 1; fi | ||
- if [[ "$GAE" = 1 ]]; then make testappengine || exit 1; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... make testappengine || exit 1; exit 0; fi
to avoid running all the regular tests again.
No description provided.