From 83f8dc636b3b936404d88802d07b0560c9f06cb6 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Thu, 8 Aug 2024 11:43:44 +0200 Subject: [PATCH] Make it possible to only build wasm testcases Signed-off-by: Andrea Peruffo --- build/run-wasm-rego-tests.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build/run-wasm-rego-tests.sh b/build/run-wasm-rego-tests.sh index 7a86e82b03..e94d089fcb 100755 --- a/build/run-wasm-rego-tests.sh +++ b/build/run-wasm-rego-tests.sh @@ -16,13 +16,18 @@ ASSETS=${ASSETS:-"$PWD/test/wasm/assets"} VERBOSE=${VERBOSE:-"0"} TESTGEN_CONTAINER_NAME="opa-wasm-testgen-container" TESTRUN_CONTAINER_NAME="opa-wasm-testrun-container" +WASM_BUILD_ONLY=${WASM_BUILD_ONLY:-"false"} function main { trap interrupt SIGINT SIGTERM mkdir -p $PWD/.go/cache/go-build mkdir -p $PWD/.go/bin generate_testcases - run_testcases + if [[ "${WASM_BUILD_ONLY}" != "true" ]]; then + run_testcases + else + echo "Running wasm tests disabled by environment variable." + fi } function interrupt {