Skip to content

improvements for running tests locally in docker. - #981

Merged
glennj merged 1 commit into
exercism:mainfrom
glennj:validate-improvements
Nov 24, 2026
Merged

glennj merged 1 commit into
exercism:mainfrom
glennj:validate-improvements

Conversation

@glennj

@glennj glennj commented Nov 24, 2026

Copy link
Copy Markdown
Contributor
  • Allow bin/validate_exercises to pass a -D option to bin/validate_one_exercise.
  • Only pull the test runner if it's not already present.
  • Put the exercise's config.json into the tempdir (eliuds-eggs fails in docker otherwise).

…exercise.

Only pull the test runner if it's not already present.
Put the exercise's config.json into the tempdir (eliuds-eggs fails in docker otherwise).
@glennj
glennj requested a review from a team November 24, 2026 14:59
@glennj glennj changed the title improvements for running tests in docker. improvements for running tests locally in docker. Nov 24, 2026
Comment thread bin/validate_one_exercise
cp "${tests}" "${dir}/${tests}"
cp bats-*.bash "${editor_files[@]}" "${dir}"
mkdir "$dir/.meta"
cp .meta/config.json "${dir}/.meta"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It more accurately runs this script the way the test runner does. Consider eliuds-eggs: most other tracks use the slug name in the solution, but here the solution is pop_count.sh (and the test file too). The online test runner has no trouble with this exercise, but running bin/validate_one_exercise -D eliuds-eggs was erroring.

I've seen other tracks that have a bin/validate-track-in-docker in either the track or the test runner. Now in the bash track bin/validate_exercises -D fulfills that purpose.

@glennj
glennj merged commit 13d4495 into exercism:main Nov 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants