Kodi Community Forum
Can't build or run tests - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: Can't build or run tests (/showthread.php?tid=367768)



Can't build or run tests - fbacher - 2022-04-07

I have never run the test suite before. When I follow the instructions on the Linux build page it says:

Kodi has a test suite which uses the Google C++ Testing Framework. This framework is provided directly in Kodi's source tree.
Build and run Kodi's test suite:
make check
Build Kodi's test suite without running it:
make kodi-test

But none of those commands succeeded. I ran them from the top level directory like the rest of the build. I have successfully built and run the gtest for the component I was working on (StringUtils) . This required me to copy it over to it's own directory and massage it to not depend upon Kodi.

But now i need to run the tests with Kodi to test more of the code.


RE: Can't build or run tests - fbacher - 2022-04-07

I should have said that I am working with Matrix 19.4


RE: Can't build or run tests - packet7 - 2023-01-28

I made a clean checkout, followed Ubuntu guide, then Linux guide and was able to execute make check command.
Code:

cd $HOME/kodi-build
cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=x11 -DAPP_RENDER_SYSTEM=gl
make check

...
[100%] Built target kodi-test
Scanning dependencies of target check
Test project /root/kodi2/kodi-build
        Start   1: TestSysfsPath.SysfsPathTestInt
  1/609 Test   #1: TestSysfsPath.SysfsPathTestInt .........................................   Passed    0.62 sec
        Start   2: TestSysfsPath.SysfsPathTestString
  2/609 Test   #2: TestSysfsPath.SysfsPathTestString ......................................   Passed    0.30 sec
        Start   3: TestSysfsPath.SysfsPathTestLongString
  3/609 Test   #3: TestSysfsPath.SysfsPathTestLongString ..................................   Passed    0.24 sec