-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Various failures in compiling current MAME integrated tests #7716
Comments
Catch2 is generally easier to code for than CppUnit, and it supports templated tests, groups, etc. It’s also lightweight with minimal dependencies. I think choosing Catch2 isn’t an issue on its own. The issue is that the unit tests are more-or-less abandoned and never run. |
These are blackbox tests for the binaries so Catch2 and CppUnit make no sense at all. pytest also does not seem to make sense since it uses a file structure as input/output I am not sure how to figure those in there and it seems unnecessary. The output could be greatly improved though. A tiny bit of documentation on the structure would not hurt either. And the reason that it always exits with 0 is just because these were always run by hand and never by a tool/workflow so it simply didn't matter. All the tests still pass with an official chdman from 0.160. Writing a small script to pull all versions to figure out when the various divergences started should be easy. |
As long as any kind of integrated tests is executed and gives some kind of confidence about non-trivial functions is okay at this point. You can do your own thing or use any library in C++, Python, Rust, NodeJS or whatever else I don't really care in any way or form.
Given the late ping about a 4+4 year old issue and #7411 do you plan doing it in the short term? I don't wanna sound harsh, but this is becoming attic league, possibly throw heaps of Python 3.13/3.14 linting errors at this point ... |
Hopefully. I am not gonna address your requirements though because that would be a total rework from the ground up which needs to be totally generic which is completely out of the scope what I was trying to do here (making sure CHD is a stable/deterministic archiving solution). I will do what I outlined above so we end up with an improved implementation, a detailed list of the introduced regressions and something that could be integrated into the CI. If I get around to it I will take a look at the improvements made since to create a list of tests necessary to improve the coverage. |
Good news, everybody. I collected all the versions of chdman since the last test was run and it turns there is nothing which affects the actual CHD SHA1. There is a long ago change related to metadata and some two more recent changes where the size of the whole CHD changed. It looks like the compression changed slightly - or it is related to #13048. I will prepare PRs for the update of the expected output so the test can at least be run manually and pass. Improvements to the test itself will come afterwards. |
Steps I tried to launch unit testing from root MAME source, host Win 8.1 (correct me if I'm wrong)
With default regtests.mak and python 3.8.6 only jedutil unittest is launched (?), and all linked unit test fails:
If I invert
jedutiltest
andchdmantest
order inREGTESTS
set at line 45 then latter gets executed, except the underlying output is full of ...And eventually ends by giving an exit code of 0 (???) go figure. ETA: looks like that the unit test make option stops at first "macro test" encountered, inconvenient imho.
It also doesn't seem like that the catch C++ unit test is involved at all, notably because there are tests defined. I honestly ignore if or how anything really compiles that part, definitely doesn't seem executed by just
make tests
and seems abandoned by itself (4 years old).Bottom line if we want to link these to a CI action then we need to fix or ditch the two/three tests suites involved, tbh other than the obvious python scripts that can benefit from overall improvement I'm not even sure about the user friendliness of current catch2 library vs. something like CppUnit, not an expert of C++ unit testing tbh.
The text was updated successfully, but these errors were encountered: