-
-
Notifications
You must be signed in to change notification settings - Fork 13.2k
bucklespring 1.4.0 (new formula) #69476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
carlocab
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR, @AlexanderWillner. A few comments.
| end | ||
|
|
||
| test do | ||
| system "buckle", "-h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed at runtime?
Co-authored-by: Carlo Cabrera <[email protected]>
| depends_on "pkg-config" => :build | ||
|
|
||
| def install | ||
| inreplace "Makefile", "-Wall -Werror", "-Wall" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upstream requested at zevv/bucklespring#97
Co-authored-by: Carlo Cabrera <[email protected]>
|
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>)?