Closed AMDmi3 closed 5 years ago
The files that are being opened are fine, the .pbf
extension just isn't shown in the error message.
You should not call the binaries ./unit/unit_tests
etc. directly, but call ctest
to run the tests. This will make sure it is run from the right directory and it should then find the test files. If you need to run the tests directly, set the TESTS_DIR
env variable first.
You should not call the binaries
./unit/unit_tests
etc. directly, but callctest
to run the tests
That was just to demonstrate the problem (actually, properly set up tests don't care which directory they are run form; you can pass CMAKE_CURRENT_{SOURCE|BINARY}_DIR
-based path via ADD_DEFINITIONS
). It's the same when running ctest
.
Full log of cmake .; make -j 5; ctest; ctest -V
on a fresh master
clone:
https://people.freebsd.org/~amdmi3/protozero.log
Also, as I've mentioned, not all failures are related to data files.
Please use an out-of-tree build as is common with CMake and documented in the README.
It is the same with out of tree build. https://people.freebsd.org/~amdmi3/protozero-oot.log
Sorry, I am out of ideas then. Must be something different on the BSD system. I can't reproduce this on Linux and I don't have a FreeBSD system. You have to try to figure this out yourself.
I've dug a bit, and it seems like either this is catch problem or an undefined behavior somewhere, because varint
tests are fixed after commenting out this line in an unrelated test:
Can you compile/run with the UB sanitizer? See the travis config for the needed options: https://github.com/mapbox/protozero/blob/master/.travis.yml#L98-L103.
It doesn't catch anything
I found several places in the code where it is possible we had some undefined behaviour. They are fixed in master now. Can you check?
Nah, same thing. Honestly I've no idea how to debug this. I suspect this could be a catch problem, so it may be worth trying catch2. I've tried updating catch to 1.12.2, but it had no effect. Catch2 requires syntax changes though, and I have no experience with it.
I tried Catch2 in a different project and ran into problems with exceptions. That's why I am staying with Catch1. You can try doing the change mentioned there, I think there was a single place in the Catch1 code where this can be changed.
This issue is stale and and I don't see any way forward here. Closing.
FreeBSD 12.0 amd64, clang 6.0.1, protozero 1.6.5, protobuf 3.6.1.
unit_tests fail:
reader_tests fail:
Most fail because they don't specify
.pbf
file extension. Full log: https://pastebin.com/zxUgJFy5