summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/benchmark.sh20
-rwxr-xr-xscripts/dev.sh1
-rwxr-xr-xscripts/iptables_tests.sh11
3 files changed, 23 insertions, 9 deletions
diff --git a/scripts/benchmark.sh b/scripts/benchmark.sh
index a0317db02..06d44f914 100644
--- a/scripts/benchmark.sh
+++ b/scripts/benchmark.sh
@@ -14,12 +14,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Run in the root of the repo.
-cd "$(dirname "$0")"
+source $(dirname $0)/common.sh
-KEY_PATH=${KEY_PATH:-"${KOKORO_KEYSTORE_DIR}/${KOKORO_SERVICE_ACCOUNT}"}
+# Exporting for subprocesses as GCP APIs and tools check this environmental
+# variable for authentication.
+export GOOGLE_APPLICATION_CREDENTIALS="${KOKORO_KEYSTORE_DIR}/${GCLOUD_CREDENTIALS}"
-gcloud auth activate-service-account --key-file "${KEY_PATH}"
+gcloud auth activate-service-account \
+ --key-file "${GOOGLE_APPLICATION_CREDENTIALS}"
-gcloud compute instances list
+gcloud config set project ${PROJECT}
+gcloud config set compute/zone ${ZONE}
+bazel run //benchmarks:benchmarks -- \
+ --verbose \
+ run-gcp \
+ startup \
+ --runtime=runc \
+ --runtime=runsc \
+ --installers=head
diff --git a/scripts/dev.sh b/scripts/dev.sh
index 6238b4d0b..a9107f33e 100755
--- a/scripts/dev.sh
+++ b/scripts/dev.sh
@@ -66,6 +66,7 @@ if [[ ${REFRESH} -eq 0 ]]; then
else
mkdir -p "$(dirname ${RUNSC_BIN})"
cp -f ${OUTPUT} "${RUNSC_BIN}"
+ chmod a+rx "${RUNSC_BIN}"
echo
echo "Runtime ${RUNTIME} refreshed."
diff --git a/scripts/iptables_tests.sh b/scripts/iptables_tests.sh
index 3069d8628..b4a5211a5 100755
--- a/scripts/iptables_tests.sh
+++ b/scripts/iptables_tests.sh
@@ -19,9 +19,12 @@ source $(dirname $0)/common.sh
install_runsc_for_test iptables
# Build the docker image for the test.
-run //test/iptables/runner-image --norun
+run //test/iptables/runner:runner-image --norun
-# TODO(gvisor.dev/issue/170): Also test this on runsc once iptables are better
-# supported
-test //test/iptables:iptables_test "--test_arg=--runtime=runc" \
+test //test/iptables:iptables_test \
+ "--test_arg=--runtime=runc" \
+ "--test_arg=--image=bazel/test/iptables/runner:runner-image"
+
+test //test/iptables:iptables_test \
+ "--test_arg=--runtime=runsc" \
"--test_arg=--image=bazel/test/iptables/runner:runner-image"