summaryrefslogtreecommitdiffstats
path: root/src/usr/cxxtest
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2011-10-03 15:10:32 -0500
committerMark W. Wenning <wenning@us.ibm.com>2011-10-06 18:45:15 -0500
commit5f0e665d50726bbd1617259b583d56bef67cd87f (patch)
tree6e667066189a1b2ce01d9e420d0028902f925b8b /src/usr/cxxtest
parent7c7734c033bed0a453623afa980d38efd791c9a2 (diff)
downloadtalos-hostboot-5f0e665d50726bbd1617259b583d56bef67cd87f.tar.gz
talos-hostboot-5f0e665d50726bbd1617259b583d56bef67cd87f.zip
Fixes to cxxtest, + add debug for trace
- cxxtestgen.pl was counting the tests wrong (did not reset # tests between suites) - to be continued... Change-Id: Ic060bcaf38dee39a620b3bef7c651851547442dc Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/423 Tested-by: Jenkins Server Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'src/usr/cxxtest')
-rw-r--r--src/usr/cxxtest/cxxtestexec.C8
-rwxr-xr-xsrc/usr/cxxtest/cxxtestgen.pl11
-rw-r--r--src/usr/cxxtest/test/cxxtesttest.H1
3 files changed, 14 insertions, 6 deletions
diff --git a/src/usr/cxxtest/cxxtestexec.C b/src/usr/cxxtest/cxxtestexec.C
index a120ed6eb..58540c3ff 100644
--- a/src/usr/cxxtest/cxxtestexec.C
+++ b/src/usr/cxxtest/cxxtestexec.C
@@ -70,9 +70,13 @@ void _start(void *io_pArgs)
TaskArgs::TaskArgs *pTaskArgs =
reinterpret_cast<TaskArgs::TaskArgs *>(io_pArgs);
+ // output a blank line so that it's easier to find the beginning of
+ // CxxTest
+ TRACDCOMP( g_trac_cxxtest, " ");
+ TRACDCOMP( g_trac_cxxtest, " ");
// count up the number of viable modules ahead of time
- TRACDCOMP( g_trac_cxxtest, "Counting CxxTextExec modules:" );
+ TRACDCOMP( g_trac_cxxtest, "Counting CxxTestExec modules:" );
VFS::find_test_modules(module_list);
@@ -80,8 +84,10 @@ void _start(void *io_pArgs)
// start executing the CxxTest modules
+
TRACDCOMP( g_trac_cxxtest, ENTER_MRK "Execute CxxTestExec, totalmodules=%d.",
totalmodules);
+ printkd( "\n Begin CxxTest...\n");
// set barrier for all the modules being started, plus this module
barrier_init( &CxxTest::g_CxxTestBarrier, totalmodules+1 );
diff --git a/src/usr/cxxtest/cxxtestgen.pl b/src/usr/cxxtest/cxxtestgen.pl
index 98e9135fc..c4b5bafef 100755
--- a/src/usr/cxxtest/cxxtestgen.pl
+++ b/src/usr/cxxtest/cxxtestgen.pl
@@ -654,15 +654,15 @@ sub writeHostBootSuites() {
my ( $suitecount, $suitevar, $testcount );
$suitecount = 1; # initialize suite count
- $testcount = 0; # initialize test count
+
## $$TODO print "\tTaskArgs *pTaskArgs = (TaskArgs *)ptr;\n";
foreach (@suites) {
$suite = $_;
-
$suitevar = "l_ex$suitecount"; # Make up the suite variable name
-
+ $testcount = 0; # 0 test count between each suite
+
## writeInclude(fileName());
if ( $debug ) {
@@ -693,7 +693,7 @@ sub writeHostBootSuites() {
## run each of the tests in the list
foreach (@{suiteTests()}) {
$test = $_;
- if ( $debug ) { print "\tprintk(\"Executing test module ", testName(), ".\\n\");\n"; }
+ print "\tprintkd(\"CxxTest: Executing ", suiteName(), " ", testName(), ".\\n\");\n";
printf "\t$suitevar->%s();\n\n", testName();
$testcount++;
}
@@ -712,8 +712,9 @@ sub writeHostBootSuites() {
print "\tCxxTest::reportTotalTests( \"", suiteName(), "\", $testcount );\n";
print "\n";
+
$suitecount++; # bump to the next suite
- }
+ } ## end foreach
}
##
diff --git a/src/usr/cxxtest/test/cxxtesttest.H b/src/usr/cxxtest/test/cxxtesttest.H
index 0c925aea3..381c99e6d 100644
--- a/src/usr/cxxtest/test/cxxtesttest.H
+++ b/src/usr/cxxtest/test/cxxtesttest.H
@@ -58,6 +58,7 @@ public:
uint64_t l_bighex = 0x1234567890abcdef;
l_bighex--; l_bighex++;
+ TS_TRACE( "CxxTest Trace" );
TS_TRACE( "CxxTest Trace dec=%d", l_dec );
TS_TRACE( "CxxTest Trace hex=0x%x", l_hex );
TS_TRACE( "CxxTest Trace bighex=0x%llx", l_bighex );
OpenPOWER on IntegriCloud