Skip to content

Run tests in the project dir instead of temp dir in run-tests.sh#39

Merged
0xNeshi merged 4 commits into
mainfrom
opt-run-tests
Nov 17, 2025
Merged

Run tests in the project dir instead of temp dir in run-tests.sh#39
0xNeshi merged 4 commits into
mainfrom
opt-run-tests

Conversation

@0xNeshi

@0xNeshi 0xNeshi commented Nov 16, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@0xNeshi 0xNeshi self-assigned this Nov 16, 2025
@0xNeshi 0xNeshi requested a review from a team as a code owner November 16, 2025 09:53
@github-actions

Copy link
Copy Markdown

Hello 👋 Thanks for your PR.

This repo does not currently have dedicated maintainers. Our guardians team will attempt to review and merge your PR, but it will likely take longer for your PR to be reviewed.

If you enjoy contributing to Exercism and have a track-record of doing so successfully, you might like to become an Exercism maintainer for this track.

Please feel free to ask any questions, or chat to us about anything to do with this PR or the reviewing process on the Exercism forum.

(cc @exercism/guardians)

@0xNeshi 0xNeshi changed the title Opt run tests Optimize run-tests.sh Nov 16, 2025
@0xNeshi 0xNeshi changed the title Optimize run-tests.sh Run tests in the project dir instead of temp dir in run-tests.sh Nov 16, 2025
@IsaacG

IsaacG commented Nov 16, 2025

Copy link
Copy Markdown
Member

What's the rationale for avoiding a temp dir? Why would you want this change?

@0xNeshi

0xNeshi commented Nov 16, 2025

Copy link
Copy Markdown
Contributor Author

What's the rationale for avoiding a temp dir? Why would you want this change?

  • avoid unnecessary whole exercise copy/pastes
  • avoid dir creation/cleanup
  • simplify bash script a bit

Do you think it's worth keeping as-is?

@IsaacG

IsaacG commented Nov 17, 2025

Copy link
Copy Markdown
Member

What's the rationale for avoiding a temp dir? Why would you want this change?

  • avoid unnecessary whole exercise copy/pastes
  • avoid dir creation/cleanup
  • simplify bash script a bit

Do you think it's worth keeping as-is?

I think it's worth having the justification in the commit description ;)

The copy/paste and directory create/delete is very low impact/cost. Having those in there isn't a big deal. But it's also entirely fine to clean them up if they're not needed. Given that it's not obvious what the benefit of this PR is, it's nice to take a moment to fill in the PR with the reasoning for future readers.

@0xNeshi 0xNeshi merged commit b76757d into main Nov 17, 2025
3 checks passed
@0xNeshi 0xNeshi deleted the opt-run-tests branch November 17, 2025 06:24
@IsaacG

IsaacG commented Nov 18, 2025

Copy link
Copy Markdown
Member

https://exercism.org/docs/building/tooling/test-runners/interface says

A path to an input directory (with a trailing slash) containing the submitted solution file(s) and any other exercise file(s). This directory should be considered as read-only. It's technically possible to write into it but it's better to use /tmp for temporary files (e.g. for compiling sources).

@0xNeshi

@0xNeshi

0xNeshi commented Nov 21, 2025

Copy link
Copy Markdown
Contributor Author

https://exercism.org/docs/building/tooling/test-runners/interface says

A path to an input directory (with a trailing slash) containing the submitted solution file(s) and any other exercise file(s). This directory should be considered as read-only. It's technically possible to write into it but it's better to use /tmp for temporary files (e.g. for compiling sources).

@0xNeshi

Do you think it makes sense to revert this PR commit?

@0xNeshi

0xNeshi commented Dec 6, 2025

Copy link
Copy Markdown
Contributor Author

@IsaacG pinging you in case you missed the last message

@IsaacG

IsaacG commented Dec 6, 2025

Copy link
Copy Markdown
Member

Do you think it makes sense to revert this PR commit?

Yes.

0xNeshi added a commit that referenced this pull request Dec 6, 2025
0xNeshi added a commit that referenced this pull request Dec 6, 2025
….sh (#39)" (#43)

* Revert "Run tests in the project dir instead of temp dir in run-tests.sh (#39)"

This reverts commit b76757d.

* refactor run-tests.sh

* Revert "refactor run-tests.sh"

This reverts commit 665f98d.

* update comment
0xNeshi added a commit that referenced this pull request Dec 8, 2025
* Revert "Run tests in the project dir instead of temp dir in run-tests.sh (#39)"

This reverts commit b76757d.

* refactor run-tests.sh

* Revert "refactor run-tests.sh"

This reverts commit 665f98d.

* update comment

* Revert "update comment"

This reverts commit 3029fa6.

* Reapply "refactor run-tests.sh"

This reverts commit 7f56f3b.

* exit on first failure

* Revert "exit on first failure"

This reverts commit 632a230.

* reapply refs

* remove redundant comma
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