-
Notifications
You must be signed in to change notification settings - Fork 43
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
Unit tests with Specdris and Travis CI Improvement. #57
base: master
Are you sure you want to change the base?
Conversation
This script isn't necessary anymore. Specdris returns an error exit code when some test case fails.
Ha, failed my own PR test. Need to add Specdris to Travis :). |
Of interest, if you are concerned with the speed of a travis build, then there are alternate ways to test idris. For example, I use a nix based configuration. |
@jfdm but you also have to add a nix script to get it running which isn't necessary for a Docker build. And the speed wasn't my main concern, but with |
Thank you for all this work! I would prefer to have everything related to testing contained in this repository so that we don't have to depend on external things (such as a Docker container). Perhaps you could add a Dockerfile + a build script — or switch to the Nix way. I like that the Docker container is not needed for non-Travis testing and I also like that you don't need Specdris for the ordinary build, you need it only for testing. Alternatively, you could add commented-out code that shows how to run tests if the Docker container (or Specdris) becomes bitrotten/not available/etc. (Even if the alternative is slower.) The bottom line is that I would like to reduce the inconvenience and blockage resulting from external resources becoming unavailable in the future, which happens often because people get too busy or for other reasons. (Been there myself on the busy end.) |
I would then switch to nix script and remove the Docker dependency. |
When I find the time to resolve these merge conflicts 😄 . But I think I will get this ready by tomorrow. |
I resolved merge conflicts with master and fixed
|
@ziman I added nix-script travis build and removed docker dependency. When you have some time left could you have a look? |
Thank you! Sorry for coming up with this so late but there's one more thing -- That was also the point of the |
Currently it doesn't support timeouts. I'll add it to specdris but this will take a moment. I let you know when I'm done. |
I applied Specdris to rewrite your unit tests:
Advantages
1
. So you don't need to analyse the text output anymoreruntests.sh
script anymoreDisadvantages
make
taskdependencies
which installs Specdris)What do I mean with I improving the travis ci builds? The current YML uses
os: mac
which takes hours for vm provisioning. By using docker the whole build process is reduced to a minute or so.Note: I didn't touch
Testing.idr
as it is part of the package and I wasn't sure if it used by lib users.Disclaimer: I am the author of Specdris ;)
What do you think of these changes?