Skip to content
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

Merged
merged 2 commits into from
Jun 21, 2018
Merged

Conversation

lyuxuan
Copy link
Contributor

@lyuxuan lyuxuan commented Jun 13, 2018

No description provided.

@dfawley
Copy link
Member

dfawley commented Jun 13, 2018

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
Copy link
Member

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.

Copy link
Member

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.

@lyuxuan lyuxuan force-pushed the gae branch 3 times, most recently from f17bbd8 to 2c3416d Compare June 14, 2018 23:51
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
Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

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
Copy link
Member

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.

@dfawley dfawley assigned lyuxuan and unassigned dfawley Jun 19, 2018
@lyuxuan lyuxuan merged commit cd69bb2 into grpc:master Jun 21, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Dec 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants