Skip to content

Add checks for tools in test suite#699

Closed
le-lenn wants to merge 2 commits into
offen:mainfrom
le-lenn:improve-test-suite
Closed

Add checks for tools in test suite#699
le-lenn wants to merge 2 commits into
offen:mainfrom
le-lenn:improve-test-suite

Conversation

@le-lenn
Copy link
Copy Markdown
Contributor

@le-lenn le-lenn commented Dec 21, 2025

This PR aims to make the test suite easier to use.

  • Adds optional gfind support for macos users
  • Checks if tools are present early and fails with helpful error messages if not

@m90
Copy link
Copy Markdown
Member

m90 commented Dec 22, 2025

I don't think the test script should normalize environments, e.g. finding out which find to use, starting such things is a very slippery slope.

I have to admit I could live with a note in the test directory's README that notes that Docker and Docker compose are required.

As for gfind I've seen people do what is described here https://formulae.brew.sh/formula/findutils

All commands have been installed with the prefix "g".
If you need to use these commands with their normal names, you
can add a "gnubin" directory to your PATH from your bashrc like:
PATH="$HOMEBREW_PREFIX/opt/findutils/libexec/gnubin:$PATH"

@le-lenn
Copy link
Copy Markdown
Contributor Author

le-lenn commented Dec 22, 2025

I understand, no problem. I'll refactor this at some point to a README update.

I really don't want to fiddle with my path just to be able to run the test suite on an open source project. I feel like this could have better DX. I haven't quite had the time to really look into how the test-suite works, but is there maybe a better alternative than a shell script which expects a bunch of tools to be installed?

@le-lenn le-lenn marked this pull request as draft December 22, 2025 17:40
@m90
Copy link
Copy Markdown
Member

m90 commented Dec 22, 2025

What I don't understand: the internet tells me find (the BSD version) should be installed by default on MacOS. Is this not true? Or is the problem that the test script calls find in a way that is not compatible with both BSD and GNU versions of find? If it's the latter, then the fix should be fixing the arguments passed?

@le-lenn
Copy link
Copy Markdown
Contributor Author

le-lenn commented Dec 22, 2025

Good point, I was not good at documenting. find is installed on macOS by default, but the version that is installed does not support the flags used in the test script. Sorry I’m on my phone, I believe it’s something like “max-depth” and another one. Either both or one of them is not recognized

@m90
Copy link
Copy Markdown
Member

m90 commented Dec 22, 2025

Would you want to find out if it's possible to do what is currently done in a way that works with both BSD and GNU versions then? I would think that's the proper fix here.

@le-lenn
Copy link
Copy Markdown
Contributor Author

le-lenn commented Dec 23, 2025

Would you want to find out if it's possible to do what is currently done in a way that works with both BSD and GNU versions then? I would think that's the proper fix here.

I agree, thanks for pushing back!

@le-lenn
Copy link
Copy Markdown
Contributor Author

le-lenn commented Dec 23, 2025

Closed in favor of #702

@le-lenn le-lenn closed this Dec 23, 2025
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