-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
json_unit runs forever when executed in build directory #319
Comments
I can confirm your observation, but the tests can be executed successfully with mkdir build
cd build
cmake ..
make
ctest which executes with
I don't think PR #320 is necessary. What do you think @tboede? |
@nlohmann yes with ctest it works because it reads the files from the source directory. |
Currently, Cmake is not mentioned in the README file, but is only called by AppVeyor. Do you think extending the REAMDE makes sense to describe the proper Cmake way? |
Maybe "make check" in the Test section should be replaced with "ctest", it seems that there is no "check" rule in the Makefile anymore. |
There is a |
Yeah, i see the rule is in the prebuilt Makefile in the source directory which was of course not available when I tried to run |
I think this issue can be closed now. |
Thanks for reporting! |
It seems to me like a bug that json_unit runs forever when I build the project in a separate build directory with
and then try to execute
in the build directory.
I would expected it to run the tests and print a result when done which it indeed does if it was build and executed in the source directory.
When I sent an interrupt signal to the running program it terminates with following output:
A look at line 1305 in unit-constructor1.cpp
shows that the input stream test wants to load a file from a subdirectory which doesn't exists in the build directory.
To fix this I added following to 'test/CMakeLists.txt' in the source directory :
Now test/data will be copied from the source directory to the build directory when they are not the same.
After rebuilding json_unit finally prints:
The text was updated successfully, but these errors were encountered: