Skip to content

Use external test data - #2081

Merged
nlohmann merged 16 commits into
developfrom
external_test_data
May 4, 2020
Merged

nlohmann merged 16 commits into
developfrom
external_test_data

Conversation

@nlohmann

@nlohmann nlohmann commented May 3, 2020

Copy link
Copy Markdown
Owner

This PR removes the test data from this repository and downloads them from an external repository.

Closes #96
Closes #482
Closes #556
Closes #567
Closes #620
Closes #732
Closes #1066
Closes #1184
Closes #1185
Closes #1235
Closes #1497
Closes #1572
Closes #1790

@nlohmann nlohmann linked an issue May 3, 2020 that may be closed by this pull request
@nlohmann nlohmann mentioned this pull request May 3, 2020
Comment thread cmake/download_test_data.cmake Outdated
@nickaein

nickaein commented May 3, 2020

Copy link
Copy Markdown
Contributor

On a clean repo, make check command fails since download_test_data command doesn't get executed.

isaac@ubuntu$ make check
make check -C test
make[1]: Entering directory '/home/isaac/nl-json/test'
[CXX]   src/unit-bson.o
src/unit-bson.cpp:37:25: fatal error: test_data.hpp: No such file or directory
compilation terminated.
Makefile:71: recipe for target 'src/unit-bson.o' failed
make[1]: *** [src/unit-bson.o] Error 1
make[1]: Leaving directory '/home/isaac/nl-json/test'
Makefile:64: recipe for target 'check' failed
make: *** [check] Error 2
isaac@ubuntu$

@nlohmann

nlohmann commented May 3, 2020

Copy link
Copy Markdown
Owner Author

On a clean repo, make check command fails since download_test_data command doesn't get executed.

I am currently moving functionality from the plain Makefile to CMake. The header is generated by CMake, and the dependency to download the test data first is only expressed in CTest.

Some more info on this: The original Makefile was written in times when the project did not use CMake. Right now, I hope that I am the only one relying on the Makefile, and I keep changing it for my only needs, sometimes hardcoding paths on my machine into it. Once this PR is merged, I would like to continue moving more functionality into CMake and thereby streamlining the whole release process which is currently a large Python project...

@nlohmann

nlohmann commented May 4, 2020

Copy link
Copy Markdown
Owner Author

Also related: #1251

@nlohmann

nlohmann commented May 4, 2020

Copy link
Copy Markdown
Owner Author

@tuananh

tuananh commented May 4, 2020

Copy link
Copy Markdown

Awesome! Thanks!

@Mailaender

Copy link
Copy Markdown

This has the downside that tests will now fail in Linux distribution build environments that have no internet access.

@nlohmann

Copy link
Copy Markdown
Owner Author

Is this a thing? I mean: having the library, having no internet connection, yet still want to execute the tests?

@Mailaender

Copy link
Copy Markdown

I had to disable the tests for https://build.opensuse.org/request/show/856756 which is not nice but also not too serious. https://build.opensuse.org/package/rdiff/home:Mailaender:branches:devel:libraries:c_c++/nlohmann_json?linkrev=base&rev=2 is my try to disable the data download modules, but it seems they don't disable the tests that depend on it, but that may more be some kind of ctest problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment