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
Deal with CDs where the start track number is not 1. #20
Conversation
Joint work with Thomas Schmitt.
From Thomas Schmitt -- Committing on his behalf.
From Thomas Schmitt -- Committing on his behalf.
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.
Looks very good. thanks!
Would you please add in test/data a suitable image that can be used for testing when the track is not one?
Even better would be to then use that in test.
Thanks again.
|
If I understand correctly, I should add a disk image to the repo in the form of a cue and bin and then add a test which uses it. What tools should I use to make the cue and bin? Does the audio contained have to be meaningful? |
|
The disk image doesn't have to be a CDWIN Presumably you burned a disk to do manual testing. How did you create that? Perhaps some sort of semi or fully automated way that can create a disk would be fine. However if you use a disk image like bin/cue or nrg, then that makes automated testing easy. |
|
I used a command from Thomas to create the CD: That burns a physical CD, but we need an on-disk image. |
|
Even having the above as a shell script along with the wav files that it uses is better than nothing. You get the idea: there was effort put into testing that this code works. How can we package this so that others might be able to benefit from it and replicate the results, to see that things work? |
|
Hi Rocky, Thomas has showed me how to make a bin and cue file for the test, but I'm at a loss as to where/how to add my test. I envisage a test which uses a bin/cue as input, and which checks the TOC against an expected outcome. Should I add a new test script to do this? Cheers |
|
The CD image can go in |
|
Hi, I've started writing the test. Sadly, there seem to be problems. If I run I get: So the track numbers are wrong! This is with all of my fixes to date, so I'm guessing there's another part of the code that assumes tracks start at #1. The cue parser perhaps? Will look into it when I find some time. |
Probably. That would be in
Thanks. |
|
OK, here's my test. What do you think? Please don't merge yet, as it needs Thomas' changes first. If this looks good, then I will squash the two last commits together and offer them to Thomas as an example for the test he is writing for libcdio. To prove it works: Now if we remove track 7 from the input cue file, leaving only tracks 8 and 9, we get in |
|
As before looks good. Sure - please pass this onto Thomas and we'll merge when everything is ready.
If you want do add that expected failure cue as its own test, extend the script and add that to |
If it's OK with you, I'd rather leave it as is. Such a test would be testing the awk script and not libcdio-paranoia. I'll now squash the commits and show Thomas. |
Here we test a CD image with tracks 7, 8 and 9.
6120bdd
to
90382a1
Compare
|
Taking the email discussion back to the PR:
Why don't we just let it fail, so as to prompt people to upgrade libcdio? |
|
I don't want CI to fail in this project. If you want to update CI in this project to pull libcdio from git sources and then build that before building libcdio-paranoia that is another possible solution. |
|
OK, let's xfail it then.
It's the libcdio version we are talking about, isn't it? How can I get the version? I was hoping |
|
In include file |
|
I see. I'll have a play around and see if I can get at that from the test Makefile somehow and conditionally add my test to Thanks |
|
Hi Rocky, The best course of action I've found so far is to do something like this: So we could have a Actually I might be able to achieve the same using It would be better if we could get the actual version number into a variable though. Then we wouldn't need a different variable each time we need to do a different version check. Do you know if it's possible? Cheers and Happy New Year! |
|
Branch track1_test has some addiional changes (that is not the PR, but just changes to the PR testing) that coiuld be used to make this work. If you don't want to use but do some other way, that's okay too. I didn't spend a lot of time thinking about this. I'm also cool to adding additional stuff to libcdio to make this kind of thing easier in the future. So feel free to make a suggestion there. BTW it would be cool to use the same testing convention in the tests: C tests start out with the word |
|
How about this rocky? Rather than having a program which checks a specific version of libcdio, we have a program which simply prints the version, then the check scripts can do whatever they want with it. I also renamed the script, as you suggested. If you like it, I'd like to squash the commits before merge. |
As discussed on the mailing list.
(Also a small OpenBSD build-system fix).