forked from GoogleCloudPlatform/python-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintegration-test.sh
More file actions
61 lines (43 loc) · 1.61 KB
/
integration-test.sh
File metadata and controls
61 lines (43 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
set -ex
export KOKORO_GITHUB_DIR=${KOKORO_ROOT}/src/github
source ${KOKORO_GFILE_DIR}/kokoro/common.sh
export GOOGLE_CLOUD_PROJECT=gcp-runtimes
sudo /usr/local/bin/pip install --upgrade -r ${KOKORO_GFILE_DIR}/appengine/integration_tests/requirements.txt
if [ -f ${KOKORO_GITHUB_DIR}/${SAMPLE_APP_DIRECTORY}/requirements.txt ]
then
sudo /usr/local/bin/pip install --upgrade -r ${KOKORO_GITHUB_DIR}/${SAMPLE_APP_DIRECTORY}/requirements.txt
fi
export GOPATH=${KOKORO_GITHUB_DIR}/${SAMPLE_APP_DIRECTORY}
flags=""
if [ -n "${STAGING_IMAGE}" ]; then
flags="$flags -i ${STAGING_IMAGE}"
fi
if [ "${SKIP_STANDARD_LOGGING_TESTS}" = "true" ]; then
flags="$flags --skip-standard-logging-tests"
fi
if [ "${SKIP_CUSTOM_LOGGING_TESTS}" = "true" ]; then
flags="$flags --skip-custom-logging-tests"
fi
if [ "${SKIP_MONITORING_TESTS}" = "true" ]; then
flags="$flags --skip-monitoring-tests"
fi
if [ "${SKIP_EXCEPTION_TESTS}" = "true" ]; then
flags="$flags --skip-exception-tests"
fi
if [ "${SKIP_CUSTOM_TESTS}" = "true" ]; then
flags="$flags --skip-custom-tests"
fi
if [ -n "${URL}" ]; then
flags="$flags --url ${URL}"
fi
if [ -n "${BUILDER}" ]; then
flags="$flags --builder ${BUILDER}"
gcloud config set app/use_runtime_builders True
gcloud config set app/runtime_builders_root file://${KOKORO_GITHUB_DIR}/${SAMPLE_APP_DIRECTORY}
fi
if [ -n "${YAML}" ]; then
flags="$flags --yaml ${KOKORO_GITHUB_DIR}/${YAML}"
fi
chmod a+x ${KOKORO_GFILE_DIR}/appengine/integration_tests/testsuite/driver.py
${KOKORO_GFILE_DIR}/appengine/integration_tests/testsuite/driver.py -d ${KOKORO_GITHUB_DIR}/${SAMPLE_APP_DIRECTORY} ${flags}