summaryrefslogtreecommitdiffstats
path: root/src/usr/cxxtest
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2011-09-12 13:22:24 -0500
committerNicholas E. Bofferding <bofferdn@us.ibm.com>2011-09-13 09:07:40 -0500
commitd12504471789ae24fbd79f55b937e9f51fa768f6 (patch)
tree49b3bfca410e911efd29d34d88ba6dfda9c7cb34 /src/usr/cxxtest
parentdcfca1f02b1a549ba57ca8e28372cef3e84268d0 (diff)
downloadtalos-hostboot-d12504471789ae24fbd79f55b937e9f51fa768f6.tar.gz
talos-hostboot-d12504471789ae24fbd79f55b937e9f51fa768f6.zip
RTC 3846: TRAC_INIT macro used for testcases not working
Change-Id: I2be53d51ceb063a2635660addb2e05a865e04299 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/332 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Diffstat (limited to 'src/usr/cxxtest')
-rwxr-xr-xsrc/usr/cxxtest/TestSuite.C14
-rw-r--r--src/usr/cxxtest/cxxtestexec.C20
2 files changed, 23 insertions, 11 deletions
diff --git a/src/usr/cxxtest/TestSuite.C b/src/usr/cxxtest/TestSuite.C
index 9f4f3f484..ab89ef0d7 100755
--- a/src/usr/cxxtest/TestSuite.C
+++ b/src/usr/cxxtest/TestSuite.C
@@ -101,12 +101,9 @@ void doFailTest( )
void doFailTest( const char *filename, uint32_t linenum )
{
- TRACDBIN( g_trac_test,
- "!!! > Test Failed: ",
- filename,
- strlen( filename) );
TRACDCOMP( g_trac_test,
- "!!! >at line %d ",
+ "!!! > Test %s Failed at line %d ",
+ filename,
linenum );
__sync_add_and_fetch( &g_FailedTests, 1 );
@@ -131,10 +128,9 @@ void reportTotalTests( const char *suitename,
{
__sync_add_and_fetch( &g_TotalTests, numtests );
- TRACDBIN( g_trac_test,
- "Suite Completed: ",
- suitename,
- strlen(suitename) );
+ TRACDCOMP( g_trac_test,
+ "Suite %s Completed ",
+ suitename );
// printk( "%s completed %ld tests\n", suitename, numtests);
return;
diff --git a/src/usr/cxxtest/cxxtestexec.C b/src/usr/cxxtest/cxxtestexec.C
index c33e32fca..a120ed6eb 100644
--- a/src/usr/cxxtest/cxxtestexec.C
+++ b/src/usr/cxxtest/cxxtestexec.C
@@ -27,6 +27,8 @@
#include <kernel/console.H>
#include <sys/time.h>
#include <sys/sync.h>
+#include <errl/errlentry.H>
+#include <errl/errlmanager.H>
#include <initservice/taskargs.H>
#include <cxxtest/TestSuite.H>
@@ -62,6 +64,7 @@ TRAC_INIT(&g_trac_cxxtest, "CXXTEST", 1024 );
extern "C"
void _start(void *io_pArgs)
{
+ errlHndl_t l_errl = NULL;
std::vector<const char *> module_list;
tid_t tidrc = 0;
TaskArgs::TaskArgs *pTaskArgs =
@@ -94,9 +97,22 @@ void _start(void *io_pArgs)
"ModulesStarted=%d",
CxxTest::g_ModulesStarted );
+ // load module and call _init()
+ l_errl = VFS::module_load( *i );
+ if ( l_errl )
+ {
+ // vfs could not load a module and returned an errorlog.
+ // commit the errorlog, mark the test failed, and
+ // move on.
+ TS_FAIL( "ERROR: Task %s could not be loaded, committing errorlog",
+ *i );
+ errlCommit( l_errl );
+ continue;
+ }
+
tidrc = task_exec( *i, NULL );
- TRACDCOMP( g_trac_cxxtest, "Launched task: tidrc=%d",
- tidrc );
+ TRACDCOMP( g_trac_cxxtest, "Launched task: %s tidrc=%d",
+ *i, tidrc );
}
TRACDCOMP( g_trac_cxxtest, "Waiting for all tasks to finish....");
OpenPOWER on IntegriCloud