<div dir="ltr">I'm getting the following error after applying the patch:<div><br></div><div>-----</div><div><div>./waf build install</div><div>Waf: Entering directory `/home/lunatic/development/rtems/test/rtems-tools/build'</div><div>Traceback (most recent call last):</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/.waf-1.9.9-75529a659e4f06cb4254801e52405e0a/waflib/Scripting.py", line 120, in waf_entry_point</div><div> run_commands()</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/.waf-1.9.9-75529a659e4f06cb4254801e52405e0a/waflib/Scripting.py", line 181, in run_commands</div><div> ctx=run_command(cmd_name)</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/.waf-1.9.9-75529a659e4f06cb4254801e52405e0a/waflib/Scripting.py", line 172, in run_command</div><div> ctx.execute()</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/.waf-1.9.9-75529a659e4f06cb4254801e52405e0a/waflib/Scripting.py", line 362, in execute</div><div> return execute_method(self)</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/.waf-1.9.9-75529a659e4f06cb4254801e52405e0a/waflib/Build.py", line 99, in execute</div><div> self.execute_build()</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/.waf-1.9.9-75529a659e4f06cb4254801e52405e0a/waflib/Build.py", line 102, in execute_build</div><div> self.recurse([self.run_dir])</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/.waf-1.9.9-75529a659e4f06cb4254801e52405e0a/waflib/Context.py", line 129, in recurse</div><div> user_function(self)</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/wscript", line 134, in build</div><div> recurse(ctx)</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/wscript", line 81, in recurse</div><div> ctx.recurse(sd)</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/.waf-1.9.9-75529a659e4f06cb4254801e52405e0a/waflib/Context.py", line 129, in recurse</div><div> user_function(self)</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/tester/wscript", line 48, in build</div><div> recurse(bld)</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/tester/wscript", line 35, in recurse</div><div> ctx.recurse(sd)</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/.waf-1.9.9-75529a659e4f06cb4254801e52405e0a/waflib/Context.py", line 129, in recurse</div><div> user_function(self)</div><div> File "/home/lunatic/development/rtems/test/rtems-tools/tester/covoar/wscript", line 115, in build</div><div> use = ['ccovoar'] + modules,</div><div>NameError: global name 'modules' is not defined</div></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">-- vijay</div></div></div></div></div>
<br><div class="gmail_quote">On 28 April 2018 at 21:54, Cillian O'Donnell <span dir="ltr"><<a href="mailto:cpodonnell8@gmail.com" target="_blank">cpodonnell8@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 28 April 2018 at 08:08, Chris Johns <span dir="ltr"><<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Cillian O'Donnell <<a href="mailto:cpodonnell8@gmail.com" target="_blank">cpodonnell8@gmail.com</a>><br>
<br>
Add ability to organize symbol sets of libraries in INI file<br>
and then read them with covoar and load the symbols directly from the<br>
libraries.<br>
<br>
rtems-tools/../testing: Add configuration files for coverage analysis.<br>
<br>
A number of covoar options are not required and are defaulted.<br>
<br>
Co-author: Krzysztof Miesowicz <<a href="mailto:krzysztof.miesowicz@gmail.com" target="_blank">krzysztof.miesowicz@gmail.com</a><wbr>><br>
Co-author: Vijay Kumar Banerjee <<a href="mailto:vijaykumar9597@gmail.com" target="_blank">vijaykumar9597@gmail.com</a>><br>
Cp-author: Chris Johns <<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>><br>
---<br>
tester/covoar/DesiredSymbols.<wbr>cc | 144 +++++-----<br>
tester/covoar/DesiredSymbols.<wbr>h | 14 +-<br>
tester/covoar/ExecutableInfo.<wbr>cc | 4 +-<br>
tester/covoar/ExecutableInfo.<wbr>h | 6 +-<br>
tester/covoar/ObjdumpProcesso<wbr>r.cc | 6 +-<br>
tester/covoar/app_common.h | 9 +-<br>
tester/covoar/covoar.cc | 300 +++++++++++++--------<br>
tester/covoar/wscript | 2 +<br>
tester/rtems/testing/bsps/leo<wbr>n3-qemu-cov.ini | 39 +++<br>
tester/rtems/testing/bsps/leo<wbr>n3-qemu.ini | 38 +++<br>
tester/rtems/testing/<wbr>coverage/Categories.txt | 19 ++<br>
tester/rtems/testing/<wbr>coverage/Explanations.txt | 35 +++<br>
.../coverage/SPARC-Annul-<wbr>Slot-Explanation.txt | 56 ++++<br>
tester/rtems/testing/<wbr>coverage/score-symbols.ini | 35 +++<br>
tester/rtems/testing/<wbr>coverage/style.css | 197 ++++++++++++++<br>
tester/rtems/testing/qemu.<wbr>cfg | 11 +-<br>
tester/rtems/testing/<a href="http://testing.mc" rel="noreferrer" target="_blank">testing.<wbr>mc</a> | 8 +<br>
17 files changed, 737 insertions(+), 186 deletions(-)<br>
create mode 100644 tester/rtems/testing/bsps/leon<wbr>3-qemu-cov.ini<br>
create mode 100644 tester/rtems/testing/bsps/leon<wbr>3-qemu.ini<br>
create mode 100644 tester/rtems/testing/coverage/<wbr>Categories.txt<br>
create mode 100644 tester/rtems/testing/coverage/<wbr>Explanations.txt<br>
create mode 100644 tester/rtems/testing/coverage/<wbr>SPARC-Annul-Slot-Explanation.t<wbr>xt<br>
create mode 100644 tester/rtems/testing/coverage/<wbr>score-symbols.ini<br>
create mode 100644 tester/rtems/testing/coverage/<wbr>style.css<br>
<br>
diff --git a/tester/covoar/DesiredSymbols<wbr>.cc b/tester/covoar/DesiredSymbols<wbr>.cc<br>
index 00d1984..9957b28 100644<br>
--- a/tester/covoar/DesiredSymbols<wbr>.cc<br>
+++ b/tester/covoar/DesiredSymbols<wbr>.cc<br>
@@ -16,6 +16,13 @@<br>
#include <string.h><br>
#include <unistd.h><br>
<br>
+#include <iostream><br>
+<br>
+#include "rld.h"<br>
+#include <rld-config.h><br>
+#include "rld-symbols.h"<br>
+#include "rld-files.h"<br>
+<br>
#include "DesiredSymbols.h"<br>
#include "app_common.h"<br>
#include "CoverageMap.h"<br>
@@ -31,75 +38,90 @@ namespace Coverage {<br>
{<br>
}<br>
<br>
- void DesiredSymbols::load(<br>
- const char* const symbolsFile<br>
+ bool DesiredSymbols::load(<br>
+ const std::string& symbolsSet,<br>
+ const std::string& buildTarget,<br>
+ const std::string& buildBSP,<br>
+ bool verbose<br>
)<br>
{<br>
- int cStatus;<br>
- bool done = false;<br>
- FILE* sFile;<br>
- SymbolInformation* symInfo;<br>
- int line = 1;<br>
- std::string symbol;<br>
-<br>
- // Ensure that symbols file name is given.<br>
- if ( !symbolsFile ) {<br>
- fprintf(<br>
- stderr,<br>
- "ERROR: DesiredSymbols::load - no symbols file specified\n"<br>
- );<br>
- exit(-1);<br>
- }<br>
-<br>
- // Open symbols file.<br>
- sFile = fopen( symbolsFile, "r" );<br>
- if ( !sFile ) {<br>
- fprintf(<br>
- stderr,<br>
- "ERROR: DesiredSymbols::load - unable to open symbols file %s\n",<br>
- symbolsFile<br>
- );<br>
- exit(-1);<br>
- }<br>
-<br>
- // Process symbols file.<br>
- while ( !done ) {<br>
-<br>
- symInfo = new SymbolInformation;<br>
-<br>
- // Skip blank lines between symbols<br>
- do {<br>
- inputBuffer[0] = '\0';<br>
- inputBuffer2[0] = '\0';<br>
- cStatus = fscanf( sFile, "%s %s", inputBuffer, inputBuffer2 );<br>
- if ( cStatus == EOF ) {<br>
- done = true;<br>
+ rld::files::cache cache;<br>
+ bool r = true;<br>
+<br>
+ //<br>
+ // Load the INI file looking for a top level:<br>
+ //<br>
+ // [symbols-sets]<br>
+ // sets = A, B, C<br>
+ //<br>
+ // For each set read the libraries from the configuration file and load.<br>
+ //<br>
+ // [A]<br>
+ // libraries = @BUILD-PREFIX@/c/@BSP@/A/libA.<wbr>a<br>
+ //<br>
+ // [B]<br>
+ // libraries = @BUILD-PREFIX@/c/@BSP@/B/libB.<wbr>a<br>
+ //<br>
+ try {<br>
+ cache.open();<br>
+<br>
+ rld::config::config config;<br>
+<br>
+ if (verbose)<br>
+ std::cerr << "Loading symbol sets: " << symbolsSet << std::endl;<br>
+<br>
+ config.load (symbolsSet);<br>
+<br>
+ const rld::config::section& sym_section = config.get_section("symbol-set<wbr>s");<br>
+<br>
+ rld::strings sets;<br>
+ rld::config::parse_items (sym_section, "sets", sets, true);<br>
+<br>
+ for (const std::string set : sets) {<br>
+ if (verbose)<br>
+ std::cerr << " Symbol set: " << set << std::endl;<br>
+ const rld::config::section& set_section = config.get_section(set);<br>
+ rld::strings libs;<br>
+ rld::config::parse_items (set_section, "libraries", libs, true);<br>
+ for (std::string lib : libs) {<br>
+ lib = rld::find_replace(lib, "@BUILD-TARGET@", buildTarget);<br>
+ lib = rld::find_replace(lib, "@BSP@", buildBSP);<br>
+ if (verbose)<br>
+ std::cerr << " Loading library: " << lib << std::endl;<br>
+ cache.add(lib);<br>
}<br>
- else {<br>
- //inputBuffer[ strlen(inputBuffer) - 1] = '\0';<br>
- line++;<br>
- }<br>
- } while ( !done && (inputBuffer[0] == '\0') );<br>
+ }<br>
<br>
- // Have we already seen this one?<br>
- if ( !done ) {<br>
- if (set.find( inputBuffer ) != set.end()) {<br>
- fprintf(<br>
- stderr,<br>
- "File: %s, Line %d: Duplicate symbol: %s\n",<br>
- symbolsFile,<br>
- line,<br>
- inputBuffer<br>
- );<br>
+ rld::symbols::table symbols;<br>
<br>
- delete symInfo;<br>
- }<br>
+ cache.load_symbols (symbols, true);<br>
<br>
- // Add this to the set of symbols.<br>
- else<br>
- set[ inputBuffer ] = *symInfo;<br>
+ for (auto& kv : symbols.globals()) {<br>
+ const rld::symbols::symbol& sym = *(kv.second);<br>
+ set[<a href="http://sym.name" rel="noreferrer" target="_blank">sym.name</a>()] = *(new SymbolInformation);<br>
+ }<br>
+ for (auto& kv : symbols.weaks()) {<br>
+ const rld::symbols::symbol& sym = *(kv.second);<br>
+ set[<a href="http://sym.name" rel="noreferrer" target="_blank">sym.name</a>()] = *(new SymbolInformation);<br>
+ }<br>
+ for (auto& kv : symbols.locals()) {<br>
+ const rld::symbols::symbol& sym = *(kv.second);<br>
+ set[<a href="http://sym.name" rel="noreferrer" target="_blank">sym.name</a>()] = *(new SymbolInformation);<br>
}<br>
+<br>
+ } catch (rld::error re) {<br>
+ std::cerr << "error: "<br>
+ << re.where << ": " << re.what<br>
+ << std::endl;<br>
+ r = false;<br>
+ } catch (...) {<br>
+ cache.close();<br>
+ throw;<br>
}<br>
+<br>
+ cache.close();<br>
+<br>
+ return r;<br>
}<br>
<br>
void DesiredSymbols::preprocess( void )<br>
diff --git a/tester/covoar/DesiredSymbols<wbr>.h b/tester/covoar/DesiredSymbols<wbr>.h<br>
index 9524c64..21c5602 100644<br>
--- a/tester/covoar/DesiredSymbols<wbr>.h<br>
+++ b/tester/covoar/DesiredSymbols<wbr>.h<br>
@@ -293,9 +293,17 @@ namespace Coverage {<br>
/*!<br>
* This method creates the set of symbols to analyze from the symbols<br>
* listed in the specified file.<br>
- */<br>
- void load(<br>
- const char* const symbolsFile<br>
+ *<br>
+ * @param[in] symbolsSet An INI format file of the symbols to be loaded.<br>
+ * @param[in] buildTarget The build target<br>
+ * @param[in] buildBSP The BSP<br>
+ * @return Returns false if the load fails.<br>
+ */<br>
+ bool load(<br>
+ const std::string& symbolsSet,<br>
+ const std::string& buildTarget,<br>
+ const std::string& buildBSP,<br>
+ bool verbose<br>
);<br>
<br>
/*!<br>
diff --git a/tester/covoar/ExecutableInfo<wbr>.cc b/tester/covoar/ExecutableInfo<wbr>.cc<br>
index d71c435..c41d931 100644<br>
--- a/tester/covoar/ExecutableInfo<wbr>.cc<br>
+++ b/tester/covoar/ExecutableInfo<wbr>.cc<br>
@@ -67,12 +67,12 @@ namespace Coverage {<br>
return aCoverageMap;<br>
}<br>
<br>
- std::string ExecutableInfo::getFileName ( void ) const<br>
+ const std::string& ExecutableInfo::getFileName ( void ) const<br>
{<br>
return executableName;<br>
}<br>
<br>
- std::string ExecutableInfo::getLibraryName<wbr>( void ) const<br>
+ const std::string& ExecutableInfo::getLibraryName<wbr>( void ) const<br>
{<br>
return libraryName;<br>
}<br>
diff --git a/tester/covoar/ExecutableInfo<wbr>.h b/tester/covoar/ExecutableInfo<wbr>.h<br>
index 7242715..20ea9bf 100644<br>
--- a/tester/covoar/ExecutableInfo<wbr>.h<br>
+++ b/tester/covoar/ExecutableInfo<wbr>.h<br>
@@ -67,14 +67,14 @@ namespace Coverage {<br>
*<br>
* @return Returns the executable's file name<br>
*/<br>
- std::string getFileName( void ) const;<br>
+ const std::string& getFileName( void ) const;<br>
<br>
/*!<br>
* This method returns the library name associated with the executable.<br>
*<br>
* @return Returns the executable's library name<br>
*/<br>
- std::string getLibraryName( void ) const;<br>
+ const std::string& getLibraryName( void ) const;<br>
<br>
/*!<br>
* This method returns the load address of the dynamic library<br>
@@ -111,7 +111,7 @@ namespace Coverage {<br>
* This method indicates whether a dynamic library has been<br>
* associated with the executable.<br>
*<br>
- * @return Returns TRUE if <br>
+ * @return Returns TRUE if<br>
*/<br>
bool hasDynamicLibrary( void );<br>
<br>
diff --git a/tester/covoar/ObjdumpProcess<wbr>or.cc b/tester/covoar/ObjdumpProcess<wbr>or.cc<br>
index b916984..d41906c 100644<br>
--- a/tester/covoar/ObjdumpProcess<wbr>or.cc<br>
+++ b/tester/covoar/ObjdumpProcess<wbr>or.cc<br>
@@ -247,15 +247,15 @@ namespace Coverage {<br>
try<br>
{<br>
status = rld::process::execute( TargetInfo->getObjdump(),<br>
- args, objdumpFile.name(), <a href="http://err.name" rel="noreferrer" target="_blank">err.name</a>() );<br>
+ args, objdumpFile.name(), <a href="http://err.name" rel="noreferrer" target="_blank">err.name</a>() );<br>
if ( (status.type != rld::process::status::normal)<br>
|| (status.code != 0) ) {<br>
throw rld::error( "Objdump error", "generating objdump" );<br>
}<br>
} catch( rld::error& err )<br>
{<br>
- std::cout << "Error while running" << TargetInfo->getObjdump()<br>
- << "for" << fileName << std::endl;<br>
+ std::cout << "Error while running " << TargetInfo->getObjdump()<br>
+ << " on " << fileName << std::endl;<br>
std::cout << err.what << " in " << err.where << std::endl;<br>
return;<br>
}<br>
diff --git a/tester/covoar/app_common.h b/tester/covoar/app_common.h<br>
index d28bfd0..ac32bbd 100644<br>
--- a/tester/covoar/app_common.h<br>
+++ b/tester/covoar/app_common.h<br>
@@ -1,6 +1,11 @@<br>
#ifndef __APP_COMMON_h<br>
#define __APP_COMMON_h<br>
<br>
+/*<br>
+ * This file needs to be removed and these globals removed from the<br>
+ * global scope. For example SymbolsToAnalyze is never destructed.<br>
+ */<br>
+<br>
#include <list><br>
<br>
#include "DesiredSymbols.h"<br>
@@ -22,8 +27,8 @@ extern char inputBuffer[MAX_LINE_LENGTH];<br>
extern char inputBuffer2[MAX_LINE_LENGTH]<wbr>;<br>
<br>
<br>
-bool FileIsNewer( const char *f1, const char *f2 ); <br>
-bool FileIsReadable( const char *f1 ); <br>
+bool FileIsNewer( const char *f1, const char *f2 );<br>
+bool FileIsReadable( const char *f1 );<br>
bool ReadUntilFound( FILE *file, const char *line );<br>
<br>
#endif<br>
diff --git a/tester/covoar/covoar.cc b/tester/covoar/covoar.cc<br>
index c36b00a..81c90d2 100644<br>
--- a/tester/covoar/covoar.cc<br>
+++ b/tester/covoar/covoar.cc<br>
@@ -29,34 +29,92 @@<br>
#define kill(p,s) raise(s)<br>
#endif<br>
<br>
+typedef std::list<std::string> CoverageNames;<br>
+typedef std::list<Coverage::Executable<wbr>Info*> Executables;<br>
+<br>
/*<br>
- * Variables to control general behavior<br>
+ * Create a build path from the executable paths. Also extract the build prefix<br>
+ * and BSP names.<br>
*/<br>
-const char* coverageFileExtension = NULL;<br>
-std::list<std::string> coverageFileNames;<br>
-int coverageExtensionLength = 0;<br>
-Coverage::CoverageFormats_t coverageFormat;<br>
-Coverage::CoverageReaderBase*<wbr> coverageReader = NULL;<br>
-char* executable = NULL;<br>
-const char* executableExtension = NULL;<br>
-int executableExtensionLength = 0;<br>
-std::list<Coverage::Executabl<wbr>eInfo*> executablesToAnalyze;<br>
-const char* explanations = NULL;<br>
-char* progname;<br>
-const char* symbolsFile = NULL;<br>
-const char* gcnosFileName = NULL;<br>
-char gcnoFileName[FILE_NAME_<wbr>LENGTH];<br>
-char gcdaFileName[FILE_NAME_<wbr>LENGTH];<br>
-char gcovBashCommand[256];<br>
-const char* target = NULL;<br>
-const char* format = NULL;<br>
-FILE* gcnosFile = NULL;<br>
-Gcov::GcovData* gcovFile;<br>
+static void createBuildPath(Executables& executablesToAnalyze,<br>
+ std::string& buildPath,<br>
+ std::string& buildPrefix,<br>
+ std::string& buildBSP)<br>
+{<br>
+ for (const auto& exe : executablesToAnalyze) {<br>
+ rld::strings eparts;<br>
+ rld::split(eparts, rld::path::path_abs(exe->getFi<wbr>leName()), RLD_PATH_SEPARATOR);<br>
+ std::string fail; // empty means all is OK else an error string<br>
+ for (rld::path::paths::reverse_ite<wbr>rator pri = eparts.rbegin();<br>
+ pri != eparts.rend();<br>
+ ++pri) {<br>
+ if (*pri == "testsuites") {<br>
+ ++pri;<br>
+ if (pri == eparts.rend()) {<br>
+ fail = "invalid executable path, no BSP";<br>
+ break;<br>
+ }<br>
+ if (buildBSP.empty()) {<br>
+ buildBSP = *pri;<br>
+ } else {<br>
+ if (buildBSP != *pri) {<br>
+ fail = "executable BSP does not match: " + buildBSP;<br>
+ break;<br>
+ }<br>
+ }<br>
+ ++pri;<br>
+ if (pri == eparts.rend() || *pri != "c") {<br>
+ fail = "invalid executable path, no 'c'";<br>
+ break;<br>
+ }<br>
+ ++pri;<br>
+ if (pri == eparts.rend()) {<br>
+ fail = "invalid executable path, no arch prefix";<br>
+ break;<br>
+ }<br>
+ if (buildPrefix.empty()) {<br>
+ buildPrefix = *pri;<br>
+ } else {<br>
+ if (buildBSP != *pri) {<br>
+ fail = "executable build prefix does not match: " + buildPrefix;<br>
+ break;<br>
+ }<br>
+ }<br>
+ ++pri;<br>
+ if (pri == eparts.rend()) {<br>
+ fail = "invalid executable path, no build top";<br>
+ break;<br>
+ }<br>
+ //<br>
+ // The remaining parts of the path is the build path. Iterator over them<br>
+ // and collect into a new paths variable to join to make a path.<br>
+ //<br>
+ rld::path::paths bparts;<br>
+ for (; pri != eparts.rend(); ++pri)<br>
+ bparts.insert(bparts.begin(), *pri);<br>
+ std::string thisBuildPath;<br>
+ rld::path::path_join(thisBuild<wbr>Path, bparts, thisBuildPath);<br>
+ if (buildPath.empty()) {<br>
+ buildPath = thisBuildPath;<br>
+ } else {<br>
+ if (buildBSP != *pri) {<br>
+ fail = "executable build path does not match: " + buildPath;<br>
+ }<br>
+ }<br>
+ break;<br>
+ }<br>
+ }<br>
+ if (!fail.empty()) {<br>
+ std::cerr << "ERROR: " << fail << std::endl;<br>
+ exit(EXIT_FAILURE);<br>
+ }<br>
+ }<br>
+}<br>
<br>
/*<br>
* Print program usage message<br>
*/<br>
-void usage()<br>
+void usage(const std::string& progname)<br>
{<br>
fprintf(<br>
stderr,<br>
@@ -69,17 +127,18 @@ void usage()<br>
" -f FORMAT - coverage file format "<br>
"(RTEMS, QEMU, TSIM or Skyeye)\n"<br>
" -E EXPLANATIONS - name of file with explanations\n"<br>
- " -s SYMBOLS_FILE - name of file with symbols of interest\n"<br>
+ " -s SYMBOL_SET_FILE - path to the INI format symbol sets\n"<br>
" -1 EXECUTABLE - name of executable to get symbols from\n"<br>
" -e EXE_EXTENSION - extension of the executables to analyze\n"<br>
" -c COVERAGEFILE_EXTENSION - extension of the coverage files to analyze\n"<br>
" -g GCNOS_LIST - name of file with list of *.gcno files\n"<br>
" -p PROJECT_NAME - name of the project\n"<br>
" -C ConfigurationFileName - name of configuration file\n"<br>
- " -O Output_Directory - name of output directory (default=."<br>
+ " -O Output_Directory - name of output directory (default=.\n"<br>
+ " -d debug - disable cleaning of tempfiles."<br>
"\n",<br>
- progname,<br>
- progname<br>
+ progname.c_str(),<br>
+ progname.c_str()<br>
);<br>
}<br>
<br>
@@ -125,42 +184,58 @@ int main(<br>
char** argv<br>
)<br>
{<br>
- std::list<std::string>::iterat<wbr>or citr;<br>
- std::string coverageFileName;<br>
- std::list<Coverage::Executable<wbr>Info*>::iterator eitr;<br>
- Coverage::ExecutableInfo* executableInfo = NULL;<br>
- int i;<br>
- int opt;<br>
- const char* singleExecutable = NULL;<br>
- rld::process::tempfile objdumpFile( ".dmp" );<br>
- rld::process::tempfile err( ".err" );<br>
- bool debug = false;<br>
- std::string option;<br>
+ CoverageNames coverageFileNames;<br>
+ std::string coverageFileName;<br>
+ Executables executablesToAnalyze;<br>
+ Coverage::ExecutableInfo* executableInfo = NULL;<br>
+ std::string executableExtension = "exe";<br>
+ std::string coverageExtension = "cov";<br>
+ Coverage::CoverageFormats_t coverageFormat;<br>
+ Coverage::CoverageReaderBase* coverageReader = NULL;<br>
+ char* executable = NULL;<br>
+ const char* explanations = NULL;<br>
+ const char* gcnosFileName = NULL;<br>
+ char gcnoFileName[FILE_NAME_LENGTH]<wbr>;<br>
+ char gcdaFileName[FILE_NAME_LENGTH]<wbr>;<br>
+ char gcovBashCommand[256];<br>
+ std::string target;<br>
+ const char* format = "html";<br>
+ FILE* gcnosFile = NULL;<br>
+ Gcov::GcovData* gcovFile;<br>
+ const char* singleExecutable = NULL;<br>
+ rld::process::tempfile objdumpFile( ".dmp" );<br>
+ rld::process::tempfile err( ".err" );<br>
+ rld::process::tempfile syms( ".syms" );<br>
+ bool debug = false;<br>
+ std::string symbolSet;<br>
+ std::string progname;<br>
+ std::string option;<br>
+ int opt;<br>
<br>
setup_signals();<br>
<br>
//<br>
// Process command line options.<br>
//<br>
- progname = argv[0];<br>
+ progname = rld::path::basename(argv[0]);<br>
<br>
- while ((opt = getopt(argc, argv, "1:L:e:c:g:E:f:s:T:O:p:v:d")) != -1) {<br>
+ while ((opt = getopt(argc, argv, "1:L:e:c:g:E:f:s:S:T:O:p:vd")) != -1) {<br>
switch (opt) {<br>
- case '1': singleExecutable = optarg; break;<br>
- case 'L': dynamicLibrary = optarg; break;<br>
- case 'e': executableExtension = optarg; break;<br>
- case 'c': coverageFileExtension = optarg; break;<br>
- case 'g': gcnosFileName = optarg; break;<br>
- case 'E': explanations = optarg; break;<br>
- case 'f': format = optarg; break;<br>
- case 's': symbolsFile = optarg; break;<br>
- case 'T': target = optarg; break;<br>
- case 'O': outputDirectory = optarg; break;<br>
- case 'v': Verbose = true; break;<br>
- case 'p': projectName = optarg; break;<br>
- case 'd': debug = true; break;<br>
+ case '1': singleExecutable = optarg; break;<br>
+ case 'L': dynamicLibrary = optarg; break;<br>
+ case 'e': executableExtension = optarg; break;<br>
+ case 'c': coverageExtension = optarg; break;<br>
+ case 'g': gcnosFileName = optarg; break;<br>
+ case 'E': explanations = optarg; break;<br>
+ case 'f': format = optarg; break;<br>
+ case 'S': symbolSet = optarg; break;<br>
+ case 'T': target = optarg; break;<br>
+ case 'O': outputDirectory = optarg; break;<br>
+ case 'v': Verbose = true; break;<br>
+ case 'p': projectName = optarg; break;<br>
+ case 'd': debug = true; break;<br>
default: /* '?' */<br>
- usage();<br>
+ usage(progname);<br>
exit(EXIT_FAILURE);<br>
}<br>
}<br>
@@ -171,18 +246,10 @@ int main(<br>
*/<br>
<br>
/*<br>
- * Target name must be set.<br>
+ * Validate that we have a symbols of interest file.<br>
*/<br>
- if ( !target ) {<br>
- option = "target -T";<br>
- throw option;<br>
- }<br>
-<br>
- /*<br>
- * Validate simulator format.<br>
- */<br>
- if ( !format ) {<br>
- option = "format -f";<br>
+ if ( symbolSet.empty() ) {<br>
+ option = "symbol set file -S";<br>
throw option;<br>
}<br>
<br>
@@ -194,22 +261,6 @@ int main(<br>
throw option;<br>
}<br>
<br>
- /*<br>
- * Has coverage file extension been specified.<br>
- */<br>
- if ( !coverageFileExtension ) {<br>
- option = "coverage extension -c";<br>
- throw option;<br>
- }<br>
-<br>
- /*<br>
- * Has executable extension been specified.<br>
- */<br>
- if ( !executableExtension ) {<br>
- option = "executable extension -e";<br>
- throw option;<br>
- }<br>
-<br>
/*<br>
* Check for project name.<br>
*/<br>
@@ -220,8 +271,8 @@ int main(<br>
}<br>
catch( std::string option )<br>
{<br>
- std::cout << "error missing option: " + option << std::endl;<br>
- usage();<br>
+ std::cerr << "error missing option: " + option << std::endl;<br>
+ usage(progname);<br>
exit(EXIT_FAILURE);<br>
}<br>
<br>
@@ -238,7 +289,7 @@ int main(<br>
);<br>
} else {<br>
<br>
- for (i=optind; i < argc; i++) {<br>
+ for (int i = optind; i < argc; i++) {<br>
// Ensure that the coverage file is readable.<br>
if (!FileIsReadable( argv[i] )) {<br>
fprintf(<br>
@@ -266,11 +317,10 @@ int main(<br>
}<br>
}<br>
}<br>
-<br>
- // If not invoked with a single executable, process the remaining<br>
- // arguments as executables and derive the coverage file names.<br>
else {<br>
- for (i = optind; i < argc; i++) {<br>
+ // If not invoked with a single executable, process the remaining<br>
+ // arguments as executables and derive the coverage file names.<br>
+ for (int i = optind; i < argc; i++) {<br>
<br>
// Ensure that the executable is readable.<br>
if (!FileIsReadable( argv[i] )) {<br>
@@ -282,9 +332,9 @@ int main(<br>
} else {<br>
coverageFileName = argv[i];<br>
coverageFileName.replace(<br>
- coverageFileName.length() - executableExtensionLength,<br>
- executableExtensionLength,<br>
- coverageFileExtension<br>
+ coverageFileName.length() - executableExtension.size(),<br>
+ executableExtension.size(),<br>
+ coverageExtension<br>
);<br>
<br>
if (!FileIsReadable( coverageFileName.c_str() )) {<br>
@@ -310,6 +360,33 @@ int main(<br>
exit(EXIT_FAILURE);<br>
}<br>
<br>
+ // The executablesToAnalyze and coverageFileNames containers need<br>
+ // to be the name size of some of the code below breaks. Lets<br>
+ // check and make sure.<br>
+ if (executablesToAnalyze.size() != coverageFileNames.size()) {<br>
+ std::cerr << "ERROR: executables and coverage name size mismatch" << std::endl;<br>
+ exit(EXIT_FAILURE);<br>
+ }<br>
+<br>
+ //<br>
+ // Find the top of the BSP's build tree and if we have found the top<br>
+ // check the executable is under the same path and BSP.<br>
+ //<br>
+ std::string buildPath;<br>
+ std::string buildTarget;<br>
+ std::string buildBSP;<br>
+ createBuildPath(executablesToA<wbr>nalyze,<br>
+ buildPath,<br>
+ buildTarget,<br>
+ buildBSP);<br>
+<br>
+ //<br>
+ // Use a command line target if provided.<br>
+ //<br>
+ if (!target.empty()) {<br>
+ buildTarget = target;<br>
+ }<br>
+<br>
if (Verbose) {<br>
if (singleExecutable) {<br>
fprintf(<br>
@@ -323,12 +400,12 @@ int main(<br>
);<br>
}<br>
fprintf( stderr, "Coverage Format : %s\n", format );<br>
- fprintf( stderr, "Target : %s\n", PrintableString(target) );<br>
+ fprintf( stderr, "Target : %s\n", buildTarget.c_str() );<br>
fprintf( stderr, "\n" );<br>
-#if 1<br>
+<br>
// Process each executable/coverage file pair.<br>
- eitr = executablesToAnalyze.begin();<br>
- for (citr = coverageFileNames.begin();<br>
+ Executables::iterator eitr = executablesToAnalyze.begin();<br>
+ for (CoverageNames::iterator citr = coverageFileNames.begin();<br>
citr != coverageFileNames.end();<br>
citr++) {<br>
<br>
@@ -342,7 +419,6 @@ int main(<br>
if (!singleExecutable)<br>
eitr++;<br>
}<br>
-#endif<br>
}<br>
<br>
//<br>
@@ -350,19 +426,22 @@ int main(<br>
//<br>
<br>
// Create data based on target.<br>
- TargetInfo = Target::TargetFactory( target );<br>
+ TargetInfo = Target::TargetFactory( buildTarget );<br>
<br>
// Create the set of desired symbols.<br>
SymbolsToAnalyze = new Coverage::DesiredSymbols();<br>
- SymbolsToAnalyze->load( symbolsFile );<br>
- if (Verbose) {<br>
- fprintf(<br>
- stderr,<br>
- "Analyzing %u symbols\n",<br>
- (unsigned int) SymbolsToAnalyze->set.size()<br>
- );<br>
+<br>
+ //<br>
+ // Read symbol configuration file and load needed symbols.<br>
+ //<br>
+ if (!SymbolsToAnalyze->load( symbolSet, buildTarget, buildBSP, Verbose )) {<br>
+ exit(EXIT_FAILURE);<br>
}<br>
<br>
+ if ( Verbose )<br>
+ std::cout << "Analyzing " << SymbolsToAnalyze->set.size()<br>
+ << " symbols" << std::endl;<br>
+<br>
// Create explanations.<br>
AllExplanations = new Coverage::Explanations();<br>
if ( explanations )<br>
@@ -379,7 +458,7 @@ int main(<br>
objdumpProcessor = new Coverage::ObjdumpProcessor();<br>
<br>
// Prepare each executable for analysis.<br>
- for (eitr = executablesToAnalyze.begin();<br>
+ for (Executables::iterator eitr = executablesToAnalyze.begin();<br>
eitr != executablesToAnalyze.end();<br>
eitr++) {<br>
<br>
@@ -407,22 +486,19 @@ int main(<br>
//<br>
<br>
// Process each executable/coverage file pair.<br>
- eitr = executablesToAnalyze.begin();<br>
- for (citr = coverageFileNames.begin();<br>
- citr != coverageFileNames.end();<br>
- citr++) {<br>
-<br>
+ Executables::iterator eitr = executablesToAnalyze.begin();<br>
+ for (const auto& cname : coverageFileNames) {<br>
if (Verbose) {<br>
fprintf(<br>
stderr,<br>
"Processing coverage file %s for executable %s\n",<br>
- (*citr).c_str(),<br>
+ cname.c_str(),<br>
((*eitr)->getFileName()).c_st<wbr>r()<br>
);<br>
}<br>
<br>
// Process its coverage file.<br>
- coverageReader->processFile( (*citr).c_str(), *eitr );<br>
+ coverageReader->processFile( cname.c_str(), *eitr );<br>
<br>
// Merge each symbols coverage map into a unified coverage map.<br>
(*eitr)->mergeCoverage();<br>
@@ -524,6 +600,8 @@ int main(<br>
objdumpFile.keep();<br>
err.override( "objdump_exec_log" );<br>
err.keep();<br>
+ syms.override( "symbols_list" );<br>
+ syms.keep();<br>
}<br>
return 0;<br>
}<br>
diff --git a/tester/covoar/wscript b/tester/covoar/wscript<br>
index 9db4815..c0270d8 100644<br>
--- a/tester/covoar/wscript<br>
+++ b/tester/covoar/wscript<br>
@@ -118,10 +118,12 @@ def build(bld):<br>
'TraceWriterQEMU.cc'],<br>
use = ['ccovoar'] + modules,<br>
cflags = ['-O2', '-g'],<br>
+ cxxflags = ['-std=c++11', '-O2', '-g'],<br>
includes = ['.'] + rtl_includes)<br>
<br>
bld.program(target = 'covoar',<br>
source = ['covoar.cc'],<br>
use = ['ccovoar'] + modules,<br>
cflags = ['-O2', '-g'],<br>
+ cxxflags = ['-std=c++11', '-O2', '-g'],<br>
includes = ['.'] + rtl_includes)<br>
diff --git a/tester/rtems/testing/bsps/le<wbr>on3-qemu-cov.ini b/tester/rtems/testing/bsps/le<wbr>on3-qemu-cov.ini<br>
new file mode 100644<br>
index 0000000..6b5e7e6<br>
--- /dev/null<br>
+++ b/tester/rtems/testing/bsps/le<wbr>on3-qemu-cov.ini<br>
@@ -0,0 +1,39 @@<br>
+#<br>
+# RTEMS Tools Project (<a href="http://www.rtems.org/" rel="noreferrer" target="_blank">http://www.rtems.org/</a>)<br>
+# Copyright 2010-2018 Chris Johns (<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>)<br>
+# All rights reserved.<br>
+#<br>
+# This file is part of the RTEMS Tools package in 'rtems-tools'.<br>
+#<br>
+# Redistribution and use in source and binary forms, with or without<br>
+# modification, are permitted provided that the following conditions are met:<br>
+#<br>
+# 1. Redistributions of source code must retain the above copyright notice,<br>
+# this list of conditions and the following disclaimer.<br>
+#<br>
+# 2. Redistributions in binary form must reproduce the above copyright notice,<br>
+# this list of conditions and the following disclaimer in the documentation<br>
+# and/or other materials provided with the distribution.<br>
+#<br>
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"<br>
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE<br>
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<br>
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF<br>
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS<br>
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN<br>
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)<br>
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE<br>
+# POSSIBILITY OF SUCH DAMAGE.<br>
+#<br>
+<br>
+#<br>
+# The Leon 3 QEMU BSP<br>
+#<br>
+[leon3-qemu]<br>
+bsp = leon3-qemu<br>
+arch = sparc<br>
+tester = %{_rtscripts}/qemu.cfg<br>
+bsp_qemu_opts = %{qemu_opts_base} -M leon3_generic<br>
+bsp_qemu_cov_opts = -exec-trace %{test_executable}.cov<br>
diff --git a/tester/rtems/testing/bsps/le<wbr>on3-qemu.ini b/tester/rtems/testing/bsps/le<wbr>on3-qemu.ini<br>
new file mode 100644<br>
index 0000000..9e8854c<br>
--- /dev/null<br>
+++ b/tester/rtems/testing/bsps/le<wbr>on3-qemu.ini<br>
@@ -0,0 +1,38 @@<br>
+#<br>
+# RTEMS Tools Project (<a href="http://www.rtems.org/" rel="noreferrer" target="_blank">http://www.rtems.org/</a>)<br>
+# Copyright 2010-2014 Chris Johns (<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>)<br>
+# All rights reserved.<br>
+#<br>
+# This file is part of the RTEMS Tools package in 'rtems-tools'.<br>
+#<br>
+# Redistribution and use in source and binary forms, with or without<br>
+# modification, are permitted provided that the following conditions are met:<br>
+#<br>
+# 1. Redistributions of source code must retain the above copyright notice,<br>
+# this list of conditions and the following disclaimer.<br>
+#<br>
+# 2. Redistributions in binary form must reproduce the above copyright notice,<br>
+# this list of conditions and the following disclaimer in the documentation<br>
+# and/or other materials provided with the distribution.<br>
+#<br>
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"<br>
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE<br>
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<br>
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF<br>
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS<br>
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN<br>
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)<br>
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE<br>
+# POSSIBILITY OF SUCH DAMAGE.<br>
+#<br>
+<br>
+#<br>
+# The Leon 3 QEMU BSP<br>
+#<br>
+[leon3-qemu]<br>
+bsp = leon3-qemu<br>
+arch = sparc<br>
+tester = %{_rtscripts}/qemu.cfg<br>
+bsp_qemu_opts = %{qemu_opts_base} -M leon3_generic<br>
diff --git a/tester/rtems/testing/coverag<wbr>e/Categories.txt b/tester/rtems/testing/coverag<wbr>e/Categories.txt<br>
new file mode 100644<br>
index 0000000..e19a456<br>
--- /dev/null<br>
+++ b/tester/rtems/testing/coverag<wbr>e/Categories.txt<br>
@@ -0,0 +1,19 @@<br>
+This is the list of Explanation Categories used when analyzing RTEMS<br>
+Coverage report. By using standard categories, the table filter on<br>
+the web site works better.<br>
+<br>
+Simple Test Case<br>
+<br>
+Hard Test Tase<br>
+<br>
+Uncalled Routine<br>
+<br>
+Interrupt Critical Section<br>
+<br>
+Simple Error Case<br>
+<br>
+Hard Error Case<br>
+<br>
+Allocation Error<br>
+<br>
+Bharath Suri<br>
diff --git a/tester/rtems/testing/coverag<wbr>e/Explanations.txt b/tester/rtems/testing/coverag<wbr>e/Explanations.txt<br>
new file mode 100644<br>
index 0000000..a5917f6<br>
--- /dev/null<br>
+++ b/tester/rtems/testing/coverag<wbr>e/Explanations.txt<br>
@@ -0,0 +1,35 @@<br>
+schedulerpriorityyield.c:47<br>
+Simple Test Case<br>
+Branch Never Taken<br>
+New test where there is more than one thread at a priority with the<br>
+executing thread being non-preemptive. Create a higher priority thread<br>
+and then yield.<br>
+<br>
+ init task at priority 2, non-preemptive<br>
+ create task at priority 2<br>
+ create task at priority 1<br>
+ yield<br>
++++<br>
+<br>
+schedulerpriorityyield.c:51<br>
+Simple Test Case<br>
+Branch Always Taken<br>
+New test where only one thread at a priority (non-preemptive), create a<br>
+thread at higher priority, then yield.<br>
+<br>
+ init task at priority 2, non-preemptive<br>
+ create task at priority 1<br>
+ yield<br>
++++<br>
+<br>
+schedulerpriorityyield.c:52<br>
+Simple Test Case<br>
+Not Executed<br>
+Same test case as schedulerpriorityyield.c:51<br>
++++<br>
+<br>
+coremsg.c:86<br>
+Simple Test Case<br>
+We need to request enough messages of a certain size that the math<br>
+overflows to less than a single message.<br>
++++<br>
diff --git a/tester/rtems/testing/coverag<wbr>e/SPARC-Annul-Slot-Explanation<wbr>.txt b/tester/rtems/testing/coverag<wbr>e/SPARC-Annul-Slot-Explanation<wbr>.txt<br>
new file mode 100644<br>
index 0000000..ef740d3<br>
--- /dev/null<br>
+++ b/tester/rtems/testing/coverag<wbr>e/SPARC-Annul-Slot-Explanation<wbr>.txt<br>
@@ -0,0 +1,56 @@<br>
+The SPARC assembly is often hard to understand because a single<br>
+instruction will show up as not executed. The instructions before<br>
+and after it will be marked as executed. The instruction before<br>
+the one not executed should be a "bxx,a" instruction which means<br>
+that the instruction following the branch instruction is executed<br>
+ONLY if the branch is taken. Otherwise it is "annulled" or skipped.<br>
+<br>
+So when you see these cases, it means the branch was NOT taken.<br>
+<br>
+=============================<wbr>==============================<wbr>========<br>
+Subject: <offlist> annul slot explanation<br>
+From: Jiri Gaisler <<a href="mailto:jiri@gaisler.com" target="_blank">jiri@gaisler.com</a>><br>
+Date: Wed, 3 Jun 2009 14:57:48 -0500<br>
+To: Joel Sherrill <Joel.Sherrill@OARcorp.com><br>
+<br>
+<br>
+Joel Sherrill wrote:<br>
+> > Hi,<br>
+> ><br>
+> > I am trying to look at more coverage cases and<br>
+> > wanted to make sure I am reading things correctly.<br>
+> ><br>
+> > The code in question is:<br>
+> ><br>
+> ><br>
+> > if ( the_thread->current_priority > interested_priority )<br>
+> > 200fd00: d8 00 e0 14 ld [ %g3 + 0x14 ], %o4<br>
+> > 200fd04: 80 a3 00 04 cmp %o4, %g4<br>
+> > 200fd08: 38 80 00 1c bgu,a 200fd78 <killinfo+0x224><br>
+> > 200fd0c: 98 10 00 04 mov %g4,<br>
+> > %o4 <== NOT EXECUTED<br>
+> ><br>
+> > /*<br>
+> > * If this thread is not interested, then go on to the next thread.<br>
+> > */<br>
+> ><br>
+> > api = the_thread->API_Extensions[ THREAD_API_POSIX ];<br>
+> > 200fd10: d4 00 e1 6c ld [ %g3 + 0x16c ], %o2<br>
+> ><br>
+> > Am I correct in interpreting this as meaning 0x200fd0c<br>
+> > is not executed because the bgu,a is never taken. And it<br>
+> > is not executed as part of falling through.<br>
+<br>
+Yes, this is correct. The branch delay slot is only executed<br>
+when the branch is taken.<br>
+<br>
+Jiri.<br>
+<br>
+> ><br>
+> > So in this case we need a test where the "if" condition<br>
+> > is true if I am reading things correctly.<br>
+> ><br>
+> > Thanks. There are a number of these 4 byte cases which<br>
+> > are probably easy to hit if I read the code correctly.<br>
+> ><br>
+> ><br>
diff --git a/tester/rtems/testing/coverag<wbr>e/score-symbols.ini b/tester/rtems/testing/coverag<wbr>e/score-symbols.ini<br>
new file mode 100644<br>
index 0000000..b3c8b18<br>
--- /dev/null<br>
+++ b/tester/rtems/testing/coverag<wbr>e/score-symbols.ini<br>
@@ -0,0 +1,35 @@<br>
+#<br>
+# RTEMS Tools Project (<a href="http://www.rtems.org/" rel="noreferrer" target="_blank">http://www.rtems.org/</a>)<br>
+# Copyright 2018 Chris Johns (<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>)<br>
+# All rights reserved.<br>
+#<br>
+# This file is part of the RTEMS Tools package in 'rtems-tools'.<br>
+#<br>
+# Redistribution and use in source and binary forms, with or without<br>
+# modification, are permitted provided that the following conditions are met:<br>
+#<br>
+# 1. Redistributions of source code must retain the above copyright notice,<br>
+# this list of conditions and the following disclaimer.<br>
+#<br>
+# 2. Redistributions in binary form must reproduce the above copyright notice,<br>
+# this list of conditions and the following disclaimer in the documentation<br>
+# and/or other materials provided with the distribution.<br>
+#<br>
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"<br>
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE<br>
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<br>
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF<br>
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS<br>
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN<br>
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)<br>
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE<br>
+# POSSIBILITY OF SUCH DAMAGE.<br>
+#<br>
+<br>
+[symbol-sets]<br>
+sets = score<br>
+<br>
+[score]<br>
+libraries=@BUILD-TARGET@/c/@B<wbr>SP@/cpukit/score/libscore.a<br>
diff --git a/tester/rtems/testing/coverag<wbr>e/style.css b/tester/rtems/testing/coverag<wbr>e/style.css<br>
new file mode 100644<br>
index 0000000..c715518<br>
--- /dev/null<br>
+++ b/tester/rtems/testing/coverag<wbr>e/style.css<br>
@@ -0,0 +1,197 @@<br>
+body {<br>
+ background: rgb(253,253,253);<br>
+ color: rgb(0,0,0);<br>
+ font-family: helvetica, sans-serif;<br>
+ font-size: 1em;<br>
+ line-height: 1.4;<br>
+ margin: 5px, 5px, 5px, 5px;<br>
+ padding: 0;<br>
+}<br>
+<br>
+a:link {<br>
+ color: rgb(180, 50, 50);<br>
+ font-family: helvetica, sans-serif;<br>
+ font-size: 1.0em;<br>
+}<br>
+<br>
+a:visited {<br>
+ color: purple;<br>
+ font-family: helvetica, sans-serif;<br>
+ font-size: 1.0em;<br>
+}<br>
+<br>
+a:hover {<br>
+ color: rgb(0, 0, 0);<br>
+ font-family: helvetica, sans-serif;<br>
+ font-size: 1.0em;<br>
+}<br>
+<br>
+a:active {<br>
+ color: red;<br>
+ font-family: helvetica, sans-serif;<br>
+ font-size: 1.0em;<br>
+}<br>
+<br>
+.heading {<br>
+ background: rgb(250,250,250);<br>
+ background-image: url("<a href="http://www.rtems.org/logos/rtems_logo.jpg" rel="noreferrer" target="_blank">http://www.rtems.org/logo<wbr>s/rtems_logo.jpg</a>");<br>
+ background-repeat: no-repeat;<br>
+ color: rgb(55,55,55);<br>
+ font-size: 1.5em;<br>
+ height: 140px;<br>
+ padding-top: 20px;<br>
+ padding-left: 300px;<br>
+}<br>
+<br>
+.heading-title {<br>
+ text-align: center;<br>
+ color: rgb(0,0,0);<br>
+ font-size: 0.9em;<br>
+ font-weight: bold;<br>
+ padding-top: 5px;<br>
+ padding-left: 0px;<br>
+ text-align: center;<br>
+ width: 100%;<br>
+}<br>
+<br>
+.datetime {<br>
+ color: rgb(55,55,55);<br>
+ font-size: 0.8em;<br>
+ padding-top: 5px;<br>
+ padding-left: 0px;<br>
+ text-align: center;<br>
+ width: 100%;<br>
+}<br>
+<br>
+.info {<br>
+ color: rgb(55,55,55);<br>
+ font-size: 0.6em;<br>
+ padding-top: 5px;<br>
+ padding-left: 00px;<br>
+ text-align: center;<br>
+ width: 100%;<br>
+}<br>
+<br>
+.stats-table {<br>
+ background: rgb(225,225,225);<br>
+ font-size: 0.9em;<br>
+ border: 1px solid rgb(200, 200, 200);<br>
+ padding: 0;<br>
+ margin-top: 3px;<br>
+ margin-left: 10px;<br>
+ width: 70%;<br>
+}<br>
+<br>
+.stats-table-target {<br>
+ background: rgb(243,243,243);<br>
+ font-size: 1.2em;<br>
+ padding-left: 10px;<br>
+ text-align: left;<br>
+}<br>
+<br>
+.stats-target-results {<br>
+ background: rgb(243,243,243);<br>
+ font-size: 0.9em;<br>
+ text-align: right;<br>
+ padding-right: 10px;<br>
+}<br>
+<br>
+.stats-target-good {<br>
+ background: rgb(30,230,30);<br>
+ font-size: 0.9em;<br>
+ text-align: right;<br>
+ padding-right: 10px;<br>
+}<br>
+<br>
+.stats-target-good {<br>
+ background: rgb(50,180,50);<br>
+ color: rgb(230,230,230);<br>
+ font-size: 0.9em;<br>
+ text-align: center;<br>
+ padding-right: 10px;<br>
+}<br>
+<br>
+.stats-target-bad {<br>
+ background: rgb(180,50,50);<br>
+ color: rgb(230,230,230);<br>
+ font-size: 0.9em;<br>
+ text-align: center;<br>
+ padding-right: 10px;<br>
+}<br>
+<br>
+.stats-table-top {<br>
+ background: rgb(243,243,243);<br>
+ color: rgb(0,0,0);<br>
+ font-size: 0.9em;<br>
+ padding-left: 2px;<br>
+}<br>
+<br>
+.stats-table-row {<br>
+ background: rgb(253,253,253);<br>
+ font-size: 0.9em;<br>
+ padding: 1px;<br>
+ text-align: right;<br>
+}<br>
+<br>
+.error-table {<br>
+ font-size: 0.9em;<br>
+ border: 1px solid rgb(200, 200, 200);<br>
+ padding: 0;<br>
+ margin-left: 10px;<br>
+ width: 96%;<br>
+}<br>
+<br>
+.error-table-top {<br>
+ background: rgb(225,225,225);<br>
+ color: rgb(0,0,0);<br>
+ font-size: 0.9em;<br>
+ padding-left: 2px;<br>
+}<br>
+<br>
+.error-table-on {<br>
+ background: rgb(225,225,225);<br>
+ font-size: 0.9em;<br>
+ padding-left: 2px;<br>
+}<br>
+<br>
+.error-table-off {<br>
+ background: rgb(253,253,253);<br>
+ font-size: 0.9em;<br>
+ padding-left: 2px;<br>
+}<br>
+<br>
+.error-table-dups {<br>
+ text-align: right;<br>
+ padding-right: 2px;<br>
+}<br>
+<br>
+.error-table-error {<br>
+ background: rgb(255,150,150);<br>
+ font-size: 0.9em;<br>
+ padding-left: 2px;<br>
+}<br>
+<br>
+.error-table-warning {<br>
+ font-size: 0.9em;<br>
+ padding-left: 2px;<br>
+}<br>
+<br>
+.navbar {<br>
+ margin-left: auto;<br>
+ margin-right: auto;<br>
+ margin-top: 10px;<br>
+ width: 40%;<br>
+}<br>
+th.table-sortable {<br>
+ background-image:url("unsorted<wbr>.gif");<br>
+ cursor: pointer;<br>
+ background-position: center left;<br>
+ background-repeat: no-repeat;<br>
+ padding-left: 15px;<br>
+}<br>
+th.table-sorted-asc {<br>
+ background-image:url("descendi<wbr>ng.gif");<br>
+}<br>
+th.table-sorted-desc {<br>
+ background-image:url("ascendin<wbr>g.gif");<br>
+}<br>
\ No newline at end of file<br>
diff --git a/tester/rtems/testing/<a href="http://qemu.cf">qemu.cf</a><wbr>g b/tester/rtems/testing/<a href="http://qemu.cf">qemu.cf</a><wbr>g<br>
index db5b6b2..858cac8 100644<br>
--- a/tester/rtems/testing/<a href="http://qemu.cf">qemu.cf</a><wbr>g<br>
+++ b/tester/rtems/testing/<a href="http://qemu.cf">qemu.cf</a><wbr>g<br>
@@ -54,14 +54,23 @@<br>
#%define qemu_opts_base -no-reboot -monitor none -serial stdio -nographic<br>
%define qemu_opts_base -no-reboot -serial null -serial mon:stdio -nographic<br>
%define qemu_opts_no_net -net none<br>
+<br>
+#<br>
+# Converage, some builds of qemu support coverage.<br></blockquote><div><br></div><div>Typo Converage. That's the only mistake I can see from reading through. Still have to apply the patches and test.<br></div><div>I'll let you know how that goes.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+#<br>
+%ifn %{defined bsp_qemu_ocv_opts}<br>
+ %define bsp_qemu_cov_opts %{nil}<br>
+%endif<br>
+<br>
#<br>
# Qemu executable<br>
#<br>
%ifn %{defined bsp_qemu_opts}<br>
%define bsp_qemu_opts %{nil}<br>
%endif<br>
+<br>
%define qemu_cmd qemu-system-%{bsp_arch}<br>
-%define qemu_opts %{bsp_qemu_opts}<br>
+%define qemu_opts %{bsp_qemu_opts} %{bsp_qemu_cov_opts}<br>
<br>
#<br>
# Executable<br>
diff --git a/tester/rtems/testing/<a href="http://testing.mc" rel="noreferrer" target="_blank">testing<wbr>.mc</a> b/tester/rtems/testing/<a href="http://testing.mc" rel="noreferrer" target="_blank">testing<wbr>.mc</a><br>
index 77f8419..662b352 100644<br>
--- a/tester/rtems/testing/<a href="http://testing.mc" rel="noreferrer" target="_blank">testing<wbr>.mc</a><br>
+++ b/tester/rtems/testing/<a href="http://testing.mc" rel="noreferrer" target="_blank">testing<wbr>.mc</a><br>
@@ -55,3 +55,11 @@ timeout: none, none, '180'<br>
<br>
# Tests detected as invalid that are valid<br>
invalid_tests: none, none, '''minimum.exe'''<br>
+<br>
+# Coverage defaults<br>
+cov_format: none, none, 'QEMU'<br>
+cov_explanations: none, none, '%{_rtscripts}/coverage/Expla<wbr>nations.txt'<br>
+cov_extension: none, none, 'cov'<br>
+cov_gcnos_file: none, none, '%{_rtscripts}/coverage/<wbr>rtems.gcnos'<br>
+cov_exe_ext: none, none, 'exe'<br>
+cov_report_format: none, none, 'html'<span class="HOEnZb"><font color="#888888"><br>
<span class="m_-2851351239161821185HOEnZb"><font color="#888888">-- <br>
2.15.1<br>
<br>
</font></span></font></span></blockquote></div><br></div></div>
<br>______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/devel</a><br></blockquote></div><br></div>