[OSRM-talk] Running C++ unit tests
Daniel Patterson
daniel at mapbox.com
Wed Apr 20 23:04:49 UTC 2016
Hi Kerrick,
Starting from blank, do:
mkdir build
cd build
cmake ..
make tests
CMake generates a bunch of Makefiles, make does the actual building.
That will compile the tests. You'll get a handful of executable files in
the "build/unit_tests/" dir, like:
~/osrm-backend/build/unit_tests$ ls *-tests
-rwxrwxr-x 1 danpat danpat 781200 Apr 20 16:00 engine-tests
-rwxrwxr-x 1 danpat danpat 2124584 Apr 20 16:02 extractor-tests
-rwxrwxr-x 1 danpat danpat 879552 Apr 20 16:01 library-tests
-rwxrwxr-x 1 danpat danpat 1417136 Apr 20 16:01 server-tests
-rwxrwxr-x 1 danpat danpat 809616 Apr 20 15:58 util-tests
You can run them individually:
$ ./engine-tests
Running 10 test cases...
*** No errors detected
daniel
On Wed, Apr 20, 2016 at 3:31 PM, Kerrick Staley <kstaley at lyft.com> wrote:
> Noob question: how do I run the C++ unit tests in /unit_tests/? Can't find
> it documented anywhere and I'm not very familiar with CMake.
>
> Thanks,
> Kerrick
>
> _______________________________________________
> OSRM-talk mailing list
> OSRM-talk at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20160420/41f729e5/attachment.html>
More information about the OSRM-talk
mailing list