Copying tests from the source tree #4909
Unanswered
HappySeaFox
asked this question in
Writing Formulae/Casks
Replies: 1 comment 1 reply
-
The best option is to follow https://docs.brew.sh/Formula-Cookbook#add-a-test-to-the-formula, which mentions some options for formula tests. Formula tests are intended to validate the install, so test code from upstream rarely meets the criteria for a good formula test, since those are focussed on validating implementation. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Output of
brew config
Output of
brew doctor
Description of issue
Hi! :)
I'm developing a formula with a
test
block. The source code I build already has a couple of useful tests that can be built in thetest
block. I currently stuck on copying the tests so they can be available in thetest
block. Is there a good way to do that?I searched across the existing formulas and found two possible ways other devs usually use:
pkgshare.install
- I don't like this approach as the final package will install useless tests for the end-user.resource
block - Again I don't like as it downloads files from the Internet.Is there a better way to copy tests from the build tree?
Beta Was this translation helpful? Give feedback.
All reactions