From b5f14507ca6a16455ba8dc99ebf4de86b86f3ea4 Mon Sep 17 00:00:00 2001 From: Eric Willigers Date: Mon, 20 Jul 2026 08:43:17 +1000 Subject: [PATCH] bin/verify-exercises-in-docker --- bin/verify-exercises-in-docker | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) mode change 100644 => 100755 bin/verify-exercises-in-docker diff --git a/bin/verify-exercises-in-docker b/bin/verify-exercises-in-docker old mode 100644 new mode 100755 index c83145b3..678ac1b6 --- a/bin/verify-exercises-in-docker +++ b/bin/verify-exercises-in-docker @@ -31,8 +31,8 @@ copy_example_or_exemplar_to_solution() { pull_docker_image() { # shellcheck disable=SC1083 - docker pull exercism/{{SLUG}}-test-runner || - die $'Could not find the `exercism/{{SLUG}}-test-runner` Docker image.\nCheck the test runner docs at https://exercism.org/docs/building/tooling/test-runners for more information.' + docker pull exercism/vimscript-test-runner || + die $'Could not find the `exercism/vimscript-test-runner` Docker image.\nCheck the test runner docs at https://exercism.org/docs/building/tooling/test-runners for more information.' } run_tests() { @@ -47,10 +47,14 @@ run_tests() { --mount type=bind,src="${PWD}",dst=/solution \ --mount type=bind,src="${PWD}",dst=/output \ --mount type=tmpfs,dst=/tmp \ - exercism/{{SLUG}}-test-runner "${slug}" /solution /output + exercism/vimscript-test-runner "${slug}" /solution /output jq -e '.status == "pass"' "${PWD}/results.json" >/dev/null 2>&1 } +print_failure() { + jq -r '.message // ""' "${PWD}/results.json" +} + verify_exercise() { local dir local slug @@ -67,7 +71,7 @@ verify_exercise() { cd "${tmp_dir}" copy_example_or_exemplar_to_solution - run_tests "${slug}" + run_tests "${slug}" || { print_failure; exit 1; } ) }