Commit 34aceee9 authored by Eric Cano's avatar Eric Cano
Browse files

Added manual section on how to get test coverage information.

Added new interface functions to Tape::Drive.
parent b0779e2c
......@@ -116,6 +116,41 @@ in the sources of the kernel.
\item{}NetBeans as an IDE, including for remote development\
\end{itemize}
\subsection{Code coverage using lcov}
Although the code coverage is not integrated in the build process, it is
straightforward to run on the code. The following recipe will deliver a set of
web pages indicating which parts of the code are covered or not in the unit tests.
The lcov package is required. It is only available on SLC6, and can be installed via yum.
\begin{itemize}
\item{}Change the main CMakeFiles.txt as in this diff:
\begin{small}
\begin{verbatim}
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 76)
+++ CMakeLists.txt (working copy)
@@ -45,7 +45,8 @@
###########################################################################
# compiler options
###########################################################################
-set (CMAKE_CXX_FLAGS "-g3 -Wall -Werror -pedantic -O2")
+set (CMAKE_CXX_FLAGS "-g3 -Wall -Werror -pedantic -O2 --coverage")
+set (CMAKE_LD_FLAGS "--coverage")
###########################################################################
# dependancies
\end{verbatim}
\end{small}
\item{}Re-run cmake and recompile as usual.
\item{}Capture the result:
\small{}\verb#lcov --capture --directory 00build/ --output-file 00build/coverage.info#.
\item{}\normalsize{}Generate the resulting html pages:
\small{}\verb#genhtml 00build/coverage.info --output-directory 00build/coverage#.
\end{itemize}
\section{Software layout}
\subsection{SCSI structures, constants and endianness}
......
......@@ -392,7 +392,17 @@ namespace Tape {
throw Tape::Exceptions::Errnum("Failed to (un)set ST Driver Option: MT_ST_FAST_EOM");
}
/**
* Jump to end of media. This will use setSTFastMTEOM() to disable MT_ST_FAST_MTEOM.
* (See TapeServer's handbook for details).
* TODO: synchronous? Timeout?
*/
virtual void jumpToEOM(void) throw (Exception) { throw Exception("Not implemented"); }
/**
*
*/
virtual void rewind(void) throw (Exception) { throw Exception("Not implemented"); }
virtual ~Drive() {
if(-1 != m_tapeFD)
m_sysWrapper.close(m_tapeFD);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment