change log for gcc-testing (2010-05-11)
rtems-vc at rtems.org
rtems-vc at rtems.org
Tue May 11 19:10:02 UTC 2010
*joel*:
2010-05-11 Joel Sherrill <joel.sherrilL at OARcorp.com>
* DesiredSymbols.cc: Remove range1.tmp and ranges2.tmp.
* ReportsBase.cc, app_common.cc, covoar.cc, do_coverage: Generate
files into user specified output directory.
M 1.216 rtems-coverage/ChangeLog
M 1.7 rtems-coverage/DesiredSymbols.cc
M 1.5 rtems-coverage/ReportsBase.cc
M 1.3 rtems-coverage/app_common.cc
M 1.16 rtems-coverage/covoar.cc
M 1.54 rtems-coverage/do_coverage
diff -u gcc-testing/rtems-coverage/ChangeLog:1.215 gcc-testing/rtems-coverage/ChangeLog:1.216
--- gcc-testing/rtems-coverage/ChangeLog:1.215 Mon May 10 17:11:52 2010
+++ gcc-testing/rtems-coverage/ChangeLog Tue May 11 13:17:33 2010
@@ -1,3 +1,9 @@
+2010-05-11 Joel Sherrill <joel.sherrilL at OARcorp.com>
+
+ * DesiredSymbols.cc: Remove range1.tmp and ranges2.tmp.
+ * ReportsBase.cc, app_common.cc, covoar.cc, do_coverage: Generate
+ files into user specified output directory.
+
2010-05-10 Joel Sherrill <joel.sherrilL at OARcorp.com>
* generate_coverage_html: Individual tables per configuration. List of
diff -u gcc-testing/rtems-coverage/DesiredSymbols.cc:1.6 gcc-testing/rtems-coverage/DesiredSymbols.cc:1.7
--- gcc-testing/rtems-coverage/DesiredSymbols.cc:1.6 Fri May 7 13:53:58 2010
+++ gcc-testing/rtems-coverage/DesiredSymbols.cc Tue May 11 13:17:33 2010
@@ -439,6 +439,8 @@
}
fclose( tmpfile );
+ unlink( "ranges1.tmp" );
+ unlink( "ranges2.tmp" );
}
SymbolInformation* DesiredSymbols::find(
diff -u gcc-testing/rtems-coverage/ReportsBase.cc:1.4 gcc-testing/rtems-coverage/ReportsBase.cc:1.5
--- gcc-testing/rtems-coverage/ReportsBase.cc:1.4 Mon May 10 13:10:16 2010
+++ gcc-testing/rtems-coverage/ReportsBase.cc Tue May 11 13:17:33 2010
@@ -4,6 +4,9 @@
#include <stdio.h>
#include <string.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include "ReportsBase.h"
#include "app_common.h"
@@ -12,7 +15,6 @@
#include "Explanations.h"
#include "ObjdumpProcessor.h"
-
#include "ReportsText.h"
#include "ReportsHtml.h"
@@ -32,14 +34,25 @@
const char* const fileName
)
{
- FILE* aFile;
+ int sc;
+ FILE *aFile;
+ std::string file;
+
+ // Create the output directory if it does not already exist
+ sc = mkdir( outputDirectory,0755 );
+ if ( (sc == -1) && (errno != EEXIST) ) {
+ fprintf(stderr, "Unable to create output directory %s\n", outputDirectory);
+ return NULL;
+ }
+
+ file = outputDirectory;
+ file += "/";
+ file += fileName;
// Open the file.
- aFile = fopen( fileName, "w" );
+ aFile = fopen( file.c_str(), "w" );
if ( !aFile ) {
- fprintf(
- stderr, "Unable to open %s\n", fileName
- );
+ fprintf( stderr, "Unable to open %s\n", file.c_str() );
}
return aFile;
}
diff -u gcc-testing/rtems-coverage/app_common.cc:1.2 gcc-testing/rtems-coverage/app_common.cc:1.3
--- gcc-testing/rtems-coverage/app_common.cc:1.2 Thu Apr 22 14:14:07 2010
+++ gcc-testing/rtems-coverage/app_common.cc Tue May 11 13:17:33 2010
@@ -22,7 +22,7 @@
Coverage::DesiredSymbols* SymbolsToAnalyze = NULL;
Coverage::Toolnames* Tools = NULL;
bool Verbose = false;
-
+const char* outputDirectory = ".";
bool FileIsNewer( const char *f1, const char *f2 ) {
struct stat buf1, buf2;
@@ -45,7 +45,7 @@
size_t len = strlen( line );
do {
- if (! fgets( discardBuff, 99, file ) )
+ if ( !fgets( discardBuff, 99, file ) )
return false;
if ( strncmp( discardBuff, line, len ) == 0 )
diff -u gcc-testing/rtems-coverage/covoar.cc:1.15 gcc-testing/rtems-coverage/covoar.cc:1.16
--- gcc-testing/rtems-coverage/covoar.cc:1.15 Mon May 10 14:31:11 2010
+++ gcc-testing/rtems-coverage/covoar.cc Tue May 11 13:17:33 2010
@@ -43,7 +43,6 @@
const char* symbolsFile = NULL;
const char* target = NULL;
const char* format = NULL;
-const char* outputDirectory = ".";
/*
* Print program usage message
@@ -369,11 +368,15 @@
// Write explanations that were not found.
if ( explanations ) {
- std::string str = explanations;
- str = str + ".NotFound";
+ std::string notFound;
+
+ notFound = outputDirectory;
+ notFound += "/";
+ notFound += "ExplanationsNotFound.txt";
+
if (Verbose)
- fprintf( stderr, "Writing Not Found Report (%s)\n", str.c_str() );
- AllExplanations->writeNotFound(str.c_str());
+ fprintf( stderr, "Writing Not Found Report (%s)\n", notFound.c_str() );
+ AllExplanations->writeNotFound( notFound.c_str() );
}
// Calculate coverage statistics and output results.
diff -u gcc-testing/rtems-coverage/do_coverage:1.53 gcc-testing/rtems-coverage/do_coverage:1.54
--- gcc-testing/rtems-coverage/do_coverage:1.53 Mon May 10 14:37:27 2010
+++ gcc-testing/rtems-coverage/do_coverage Tue May 11 13:17:33 2010
@@ -203,10 +203,13 @@
{
echo "BSP: " ${BSP}
echo "Target: " ${TARGET}
+ echo "Compiler version: " `${TARGET}-gcc --version | grep gcc`
+ echo "do_optimize_size: " ${do_optimize_size}
+ echo "Optimization Level: " ${c_opt}
+ echo "POSIX Enabled: " ${do_posix}
+ echo "Developmental Code: " ${do_developmental}
echo "do_all: " ${do_all}
echo "do_covmerge " ${do_covmerge}
- echo "do_posix: " ${do_posix}
- echo "do_optimize_size: " ${do_optimize_size}
echo "do_rtems_update: " ${do_rtems_update}
echo "do_rtems_configure: " ${do_rtems_configure}
echo "do_rtems_build: " ${do_rtems_build}
@@ -217,11 +220,16 @@
echo "do_publish: " ${do_publish}
echo "do_save_tarballs: " ${do_save_tarballs}
echo "Clean Before: " ${do_clean}
- echo "Executable Extension " ${RTEMSEXT}
- echo "Coverage Extension " ${COVEXT}
-
+ echo "Executable Extension: " ${RTEMSEXT}
+ echo "Coverage Extension: " ${COVEXT}
}
+if [ ${do_optimize_size} = yes ] ; then
+ c_opt=-Os
+else
+ c_opt=-O2
+fi
+
if [ ${verbose} = "yes" ] ; then
print_verbose
fi
@@ -265,12 +273,6 @@
exit 1
fi
-if [ ${do_optimize_size} = yes ] ; then
- c_opt=-Os
-else
- c_opt=-O2
-fi
-
EXTENSION=${c_opt}
if [ ${do_posix} = yes ] ; then
EXTENSION=${EXTENSION}P
@@ -294,17 +296,18 @@
# generate table row of results in html
generate_html()
{
+ summary=$1
echo "<TR>"
print_element ${day}
print_element ${hour}:${minute}
print_element ${c_opt}
print_element ${do_posix}
print_element ${do_developmental}
- print_element `grep "Uncovered range" summary.txt | cut -d ':' -f2`
- print_element `grep "age Not Exec" summary.txt | cut -d ':' -f2`
- print_element `grep "age Exec" summary.txt | cut -d ':' -f2`
- print_element `grep "Bytes Not Exec" summary.txt | cut -d ':' -f2`
- print_element `grep "Bytes Analyzed" summary.txt | cut -d ':' -f2`
+ print_element `grep "Uncovered range" ${summary} | cut -d ':' -f2`
+ print_element `grep "age Not Exec" ${summary} | cut -d ':' -f2`
+ print_element `grep "age Exec" ${summary} | cut -d ':' -f2`
+ print_element `grep "Bytes Not Exec" ${summary} | cut -d ':' -f2`
+ print_element `grep "Bytes Analyzed" ${summary} | cut -d ':' -f2`
print_element "<A HREF=\"${results_dir}\">untarred</A> " \
"<A HREF=\"${results_dir}.tar.bz2\">tarball</A> "
echo "</TR>"
@@ -325,17 +328,8 @@
cd ${BASEDIR}/${BSP}-tests/
check_status $? "cd ${BSP}-tests"
- rm -f summary.txt annotated.txt uncovered.txt branch.txt sizes.txt
-
- ( check_endof ; \
- echo "Optimization Level : " ${c_opt} ; \
- echo "POSIX Enabled : " ${do_posix} ; \
- echo "Developmental Code : " ${do_developmental} ; \
- ) >summary.txt
rm -rf ${results_dir}
- # XXX temporary until output directory really supported
- mkdir ${results_dir}
- # XXX end of temporary
+ mkdir ${results_dir}
${COVBASE}/covoar \
-O ${results_dir} \
-T ${TARGET} \
@@ -343,29 +337,33 @@
-s rtems.syms \
-E ${COVBASE}/Explanations.txt \
-e exe -c ${RTEMSEXT}.${COVEXT} \
- *.exe >> summary.txt
+ *.exe > ${results_dir}/summary.txt
check_status $? "covoar failed"
- (echo "====== Largest Range Sizes (Size and Count)======" ; \
- grep ^Size uncovered.txt | cut -d':' -f2 | sort -n | uniq -c | \
- tail -15 | sed -e 's/ *\([0-9]*\) *\([0-9]*\)/\2 \1/' | sort -n -r | \
- while read l; do printf "%6d %6d\n" $l; done ; \
- echo "=====================================" ) >>summary.txt
+ # This should be made obsolete by sortable tables.
+ #(echo "====== Largest Range Sizes (Size and Count)======" ; \
+ # grep ^Size uncovered.txt | cut -d':' -f2 | sort -n | uniq -c | \
+ # tail -15 | sed -e 's/ *\([0-9]*\) *\([0-9]*\)/\2 \1/' | sort -n -r | \
+ # while read l; do printf "%6d %6d\n" $l; done ; \
+ # echo "=====================================" ) >>summary.txt
- generate_html >row.html
+ check_endof >${results_dir}/testsWithNoEndOfTest.txt
- cat summary.txt
+ # Generate the configuration settings file
+ (
+ echo "#"
+ echo "# Settings for this coverage test run"
+ echo "#"
+ echo
+ print_verbose
+ ) >${results_dir}/configuration.txt
- # Now create the archive of information
+ # XXX summary should be in output directory
+ generate_html ${results_dir}/summary.txt >${results_dir}/row.html
- # XXX temporary until output directory really supported
- cp *.txt *.html ${results_dir}
- # XXX end of temporary
-
- # XXX temporary until generated into output directory
- cp ${COVBASE}/Explanations.txt.NotFound ${results_dir}
- # XXX end of temporary
+ cat ${results_dir}/summary.txt ${results_dir}/testsWithNoEndOfTest.txt
+ # Now create the archive of information
cp ${COVBASE}/covoar.css ${results_dir}
echo "Results saved in ${results_dir}.tar.bz2"
tar cjf ${results_dir}.tar.bz2 ${results_dir}
@@ -609,17 +607,6 @@
if [ ${do_reports} = "yes" ] ; then
echo "Generating reports..."
- # Generate the configuration settings file
- ( \
- echo "#"
- echo "# Settings for this coverage test run"
- echo "#"
- echo
- echo "Compiler version: " `${TARGET}-gcc --version | grep gcc`
- echo "Optimization flag " ${c_opt}
- print_verbose
- ) > ${BASEDIR}/${BSP}-tests/configuration.txt
-
cd ${BASEDIR}/${BSP}-tests/
check_status $? "cd ${BSP}-tests"
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100511/6ba093f0/attachment.html>
More information about the vc
mailing list