bucklespring 1.4.0 (new formula)#69476
bucklespring 1.4.0 (new formula)#69476AlexanderWillner wants to merge 9 commits intoHomebrew:masterfrom
Conversation
carlocab
left a comment
There was a problem hiding this comment.
Thanks for your PR, @AlexanderWillner. A few comments.
| end | ||
|
|
||
| test do | ||
| system "buckle", "-h" |
There was a problem hiding this comment.
Can you propose a more substantial test than checking the version or calling for help? These tests rarely ever fail even for broken installations.
We want tests that don’t require any user input and test the basic functionality of the application. For example
foo build-foo input.foois a good test and (despite their widespread use)foo --versionandfoo --helpare bad tests.
Ref. https://docs.brew.sh/Formula-Cookbook#add-a-test-to-the-formula
| end | ||
|
|
||
| test do | ||
| system "buckle", "-h" |
There was a problem hiding this comment.
We need a test that exercises the some of the functionality of the app. Version checks or usage checks (foo --version or foo --help) are not sufficient, as explained in the formula cookbook.
In most cases, a good test would involve running a simple test case: run #{bin}/foo input.txt.
- Then you can check that the output is as expected (with assert_equal or assert_match on the output of shell_output)
- You can also check that an output file was created, if that is expected: assert_predicate testpath/"output.txt", :exist?
Some advice for specific cases:
- If the formula is a library, compile and run some simple code that links against it. It could be taken from upstream's documentation / source examples.
- If the formula is for a GUI program, try to find some function that runs as command-line only, like a format conversion, reading or displaying a config file, etc.
- If the software cannot function without credentials, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected.
- Same if the software requires a virtual machine, docker instance, etc. to be running.
Formula/bucklespring.rb
Outdated
|
|
||
| depends_on "make" => :build | ||
| depends_on "alure" | ||
| depends_on "pkg-config" |
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
| depends_on "pkg-config" => :build | ||
|
|
||
| def install | ||
| inreplace "Makefile", "-Wall -Werror", "-Wall" |
There was a problem hiding this comment.
We don't really like new formulae that require patching.
This should be submitted to upstream.
Also, I'm a bit worried, is this project actively maintained?
The last release was 4 years ago, nevertheless, it has some fresher commits.
There was a problem hiding this comment.
upstream requested at zevv/bucklespring#97
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
brew install --build-from-source <formula>, where<formula>is the name of the formula you're submitting?brew test <formula>, where<formula>is the name of the formula you're submitting?brew audit --strict <formula>(after doingbrew install <formula>)?