ncsurobotics / svr

Seawolf Video Router
http://www.ncsurobotics.com
3 stars 2 forks source link

Tests fail - do we need new tests? #8

Open jsalzbergedu opened 7 years ago

jsalzbergedu commented 7 years ago

First of all, test.c simply does not compile for me. This can be reproduced by running make tests on the master branch. test.c does not look like it uses svr's current API, as it uses two arguments for SVR_Stream_new

Secondly, one of the tests builds, but it segfaults. test_source.c segfaults at SVR_Stream_resize: if I run the program with svrd up, I get

[WARNING][SVR] Lost client connection
Segmentation fault (core dumped)

Using the debugger on it:

Thread 1 "check" hit Breakpoint 1, 0x00007ffff7bd10f4 in SVR_Stream_resize () from /home/jacob/sources/svr/lib/libsvr.so.0
(gdb) s
Single stepping until exit from function SVR_Stream_resize,
which has no line number information.

Thread 1 "check" received signal SIGSEGV, Segmentation fault.

I'll have to step through the git history to see if any of these tests ever succeeded, but a library function segfaulting seems fishy.

I was also wondering if we could get Travis CI tests. That way, a lot of the testing that needs to be done on svr and the changes to it can be automated

rafaelesteller commented 7 years ago

Its quite possible does test never worked or worked for a different revision of svr. I would't worry about it too much. I just ran it on the old version on github and it fails. so don't worry about the test folder.

I would test the compilation by checking that svrwatch and the reccording function work. Thats a good enough functional/practical test.

Another test we can do is stress testing svr by having different camera streams and computers connect to it. We can discuss if its worth doing this and how to do it at the next meeting.

I think the cmake stuff works, and we should ignore the test folder. the compilation can be tested through svrwatch and the reccord python function.