-
Notifications
You must be signed in to change notification settings - Fork 225
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
Add test suite for `icemulti' #92
base: master
Are you sure you want to change the base?
Conversation
Why do we need >200kB of .hex files? Wouldn't checksums suffice? I think the "skipping" stuff in icebram Makefile is horrible: If you run "make check" and you don't have the tools installed then it should simply fail imo. Historically something like that is called "make test" in icestorm (see Makefiles in icecompr, icebram, icetime). If you want to rename this from "test" to "check", then we can discuss this: Why do you want to do this? However, the "test check:" target you added in icebram/Makefile is imo bogus. Either we call it "test" or we call it "check". But I don't see anything to gain by supporting both names in some subdirs (but not in others?).. Also: icetime already has a "make test" but you added an empty "make check" target. Why? |
They would suffice for detecting if there are differences, but in order to debug the situation, we would want to know what the differences are. That's why the correct output is included in the test suite. The rationale for using hex files as opposed to binary files is that they make more sense in terms of source code management. There are some commits which change the output
I think the default test suite for a package should always be able to run without requiring the user to install any addtional software. If you want the
This way, any unwanted changes in
As far as I am aware of,
I didn't see a reason to remove the existing target
Oops, I missed that. However, the same problem as with the |
What?! So no test suite must use a unit testing framework for example, unless the same unit testing framework is also required to build the software? Sorry, but that is obviously a nonsensical requirement. |
I don't know which test frameworks you are talking about, but the ones I've been using so far (Autotest as well as Automake's serial and parallel test harnesses) go to great lengths to ensure everything the user needs in order to run the test suite is included in the distribution tarball. The way I see it, a test suite's worth is in people running it. Running the tests should be a natural part of committing some changes, preparing a distribution, or installing a software package, so the traditional
gradually evolves to become a
But people won't run tests if they are slow or if they can't run them. The idea that people stop to install extra software on their machine is illusive; instead, they just won't run the tests. Requiring Yosys and arachne-pnr in an IceStorm test is probably okay since in the most common use case, they are part of the same toolchain. However, having the toplevel |
To name just one: gtest |
I changed the pull request according to your feedback. |
icebram/Makefile
Outdated
@@ -10,6 +10,10 @@ icebram$(EXE): icebram.o | |||
$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS) | |||
|
|||
check: all | |||
:; type yosys |
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.
@rlutz, I never saw the :
being used this way :;
, what is the purpose?
@martinda The purpose is apparently to force "make" to run the command in a shell (which it for example does when the command string contains a semicolon), which is necessary because (1) I just makes thing more complicated than they need to be. For example, the command checking icecube2 in the icetime makefile just replicates the icecube version number and if someone updates the icecube version used in icefuzz then it is very likely that we will forget to update the version number in that Makefile. And adding this command it gains us nothing! The icecube.sh shell script is executed with (2) The |
I removed the global target |
I'm not sure if that's what kept you from merging the pull request, but on request of @martinda, I removed the reference files, too. |
The problem with the test suite as it is now is that it makes it hard to verify whether the output of new or changed tests is valid before merging them (which I did for the tests I submitted, and without which they are kind of pointless). |
This pull request adds the target
check
as a place to add tests for the individual tools. It calls the existingicebram
test, but as this depends on additional tools being installed (Yosys, arachne-pnr, IVerilog), it is skipped if these tools aren't found inPATH
. It then adds a test suite foricemulti
which covers every possible combination of input files as well as typical valid and invalid values for the command-line options.