numbbo / coco

Numerical Black-Box Optimization Benchmarking Framework
https://numbbo.github.io/coco
Other
262 stars 87 forks source link

Problems with the library cmocka #219

Closed phrsampaio closed 8 years ago

phrsampaio commented 8 years ago

Errors related to the library cmocka are shown when doing ./do.py test-c on Linux. The question is how to properly install that library in order to run local tests.

dtusar commented 8 years ago

Can you please put the the error (with the stack trace) here.

phrsampaio commented 8 years ago

I managed to install it on my personal machine (also running Linux) by following the instructions in http://zhuyong.me/blog/2014/03/19/c-code-unit-testing-using-cmocka/ with the version 1.0.1, downloaded from https://cmocka.org/files/1.0/. "./do.py test-c" is not showing errors anymore. In the other machine, I had tried with the version 0.3.2, which didn't work out. I will try again with the latest version (1.0.1) to see if it works.

dtusar commented 8 years ago

Yes, you should always install the latest version (i.e. 1.0.1).

You can add the generated library in the .../code-experiments/test/unit-test/lib folder. Create a new folder and name it according to your linux distribution name. In order to use the new library while running the tests, you should update the build_c_unit_tests() in do.py. You can also just send me the library and I'll do the rest.