C Coverage, Travis Builds

September 4, 2013 - 3 minute read -
travis gsoc

Commits

Thinsg done:

  • Coverage of c files: The terminate() and kill() methods to the server now have a parameter cov. Setting its value as True, leads to dumping of coverage data in the tools directory (alternatively environment variable GCOV_PREFIX can be set to dump it elsewhere). Internally the gst-switch-srv calls __gcov_flush() when it receives the signal SIGUSR1. This signal can also be sent like killall -USR1 gst-switch-srv. Note that sending SIGUSR1 does not kill the server. Everytime the coverage data is dumped in the form of .gcda files, make coverage is run. This turns it into .gcov files. The gcov files can be appended together unlike gcda files. Thus results of multiple runs of gcov can be seen by running make coverage after each run.
  • Enabled documentation at readthedocs: http://gst-switch.readthedocs.org/en/latest/
  • Setup coveralls for C code: Coverage of C code over coveralls is done through cpp-coveralls. However, just running the command coveralls was a problem. Running it caused it to search for all .o files including the ones generated by gstreamer and gst-plugins which were installed earlier. These files had some strange characters like /0xe9 which gave a UnicodeDecodeError internally. The problem was solved by specifying the exact root directory where to find the coverage data (i.e tools directory) using the -r option. The overall coverage is at https://coveralls.io/r/hyades/gst-switch
  • Precise builds: Precise has Gio modules different from Quantal. My machine is quantal, thus running it in precise gave TypeError. In my call_sync function, I was giving bus_name a None value. This had a problem in Precise since it does not allow None values. Providing this value solved the issue.
  • Liniting the code

Current Issues

Even though the build runs on travis, some parts need attention.

  • Unittests had 100% coverage
  • 6 out of 13 integration tests Failed
  • Running gst-switch-srv gave an error
    
    ./tools/gstworker.c:270:error: missing: faac
    ./tools/gstworker.c:784:error: recorder: failed to create new pipeline
    
    
  • Seems an issue with the libvpx installation.

Comments Section

Feel free to comment on the post but keep it clean and on topic.

blog comments powered by Disqus