From 9776639b1a13811191c875c73e185efee577468f Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Tue, 19 Jul 2022 11:56:40 +0100 Subject: [PATCH] Build local image to run tests with make e2e-test (#1722) --- 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}$