From 4a4f7669a336ba93074280165da3b5b25bc8f639 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Mon, 18 Jul 2022 14:57:40 +0100 Subject: [PATCH] chore: building image locally to run tests --- e2e/Makefile | 2 +- e2e/scripts/run-e2e.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 e2e/scripts/run-e2e.sh diff --git a/e2e/Makefile b/e2e/Makefile index cad92172af9..95a0fa5b6a2 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -8,6 +8,6 @@ cleanup-ibc-test-containers: done e2e-test: cleanup-ibc-test-containers - @go test -v ./ --run $(suite) -testify.m ^$(test)$$ + ./scripts/run-e2e.sh $(suite) $(test) .PHONY: cleanup-ibc-test-containers e2e-test diff --git a/e2e/scripts/run-e2e.sh b/e2e/scripts/run-e2e.sh new file mode 100755 index 00000000000..1e0875c099f --- /dev/null +++ b/e2e/scripts/run-e2e.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -euo pipefail + +SUITE="${1}" +TEST="${2}" +export SIMD_TAG="${SIMD_TAG:-latest}" +export SIMD_IMAGE="${SIMD_IMAGE:-ibc-go-simd-e2e}" + +# In CI, the docker images will be built separately. +# context for building the image is one directory up. +if [ "${CI:-}" != "true" ] +then + (cd ..; docker build . -t "${SIMD_IMAGE}:${SIMD_TAG}") +fi + +go test -v ./ --run ${SUITE} -testify.m ^${TEST}$