summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2011-06-06 14:15:03 -0500
committerMark W. Wenning <wenning@us.ibm.com>2011-06-28 12:14:11 -0500
commita4809cd65ce96d0b56ec316b14836087cf1d647b (patch)
tree4b9da793d98437e7aee46dd9f625a14063c953e2 /src/include
parent99d638310adbe9340981ce1fe06c47e6988ab369 (diff)
downloadtalos-hostboot-a4809cd65ce96d0b56ec316b14836087cf1d647b.tar.gz
talos-hostboot-a4809cd65ce96d0b56ec316b14836087cf1d647b.zip
TS_TRACE now dumps to trace buffer instead of printk
-Minor change to cxxtestgen.pl script to bump the suite name and add whitespace - resolve conflicts in makefile and cxxtestgen.pl - fix TS_TRACE - add fixes from code review - add debug messages to trace modules not finishing problem - line over 80 chars, remove 10 sec delay - add 5 min timeout to autocitest - change check interval to 5 seconds instead of 30 seconds Change-Id: I11f18fbeed007590a4ca70c45d109071474a9864 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/154 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rwxr-xr-xsrc/include/usr/cxxtest/TestSuite.H97
1 files changed, 51 insertions, 46 deletions
diff --git a/src/include/usr/cxxtest/TestSuite.H b/src/include/usr/cxxtest/TestSuite.H
index bb097fa1d..937a29011 100755
--- a/src/include/usr/cxxtest/TestSuite.H
+++ b/src/include/usr/cxxtest/TestSuite.H
@@ -8,6 +8,10 @@
/******************************************************************************/
#include <stdint.h>
+#include <trace/interface.H>
+
+extern trace_desc_t *g_trac_test;
+
//
// class TestSuite is the base class for all test suites.
// To define a test suite, derive from this class and add
@@ -16,52 +20,53 @@
namespace CxxTest
{
- class TestSuite
- {
- public:
- virtual ~TestSuite();
- virtual void setUp();
- virtual void tearDown();
- };
-
- class AbortTest {};
-
- void doTrace( const char *file, unsigned line, const char *message );
- void doWarn( const char *file, unsigned line, const char *message );
- void doFailTest( const char *file, unsigned line, const char *message );
- void doFailAssert( const char *file, unsigned line, const char *expression, const char *message );
-
-
- void reportTotalTests( const char *suitename, uint64_t numtests );
-
- // $$ these should be set up as readonly accessors
- uint64_t getTotalTests(void);
- uint64_t getFailedTests(void);
- uint64_t getWarnings(void);
- uint64_t getTraceCalls(void);
-
- extern uint64_t g_ModulesCompleted;
-
-# define _TS_TRY
-# define ___TSM_CATCH(f,l,m)
-# define __TSM_CATCH(f,l,m)
-# define __TS_CATCH(f,l)
-# define _TS_CATCH
-# define _TS_CATCH_TYPE(t, b)
-# define _TS_LAST_CATCH(b)
-# define _TS_CATCH_ABORT(b)
-
- // TS_TRACE
-# define _TS_TRACE(f,l,e) CxxTest::doTrace( (f), (l), e )
-# define TS_TRACE(e) _TS_TRACE( __FILE__, __LINE__, e )
-
- // TS_WARN
-# define _TS_WARN(f,l,e) CxxTest::doWarn( (f), (l), e )
-# define TS_WARN(e) _TS_WARN( __FILE__, __LINE__, e )
-
- // TS_FAIL
-# define _TS_FAIL(f,l,e) CxxTest::doFailTest( (f), (l), e )
-# define TS_FAIL(e) _TS_FAIL( __FILE__, __LINE__, e )
+
+class TestSuite
+{
+public:
+ virtual ~TestSuite();
+ virtual void setUp();
+ virtual void tearDown();
+};
+
+class AbortTest {};
+
+void doTrace( void );
+void doWarn( const char *file, unsigned line, const char *message );
+void doFailTest( const char *file, unsigned line, const char *message );
+void doFailAssert( const char *file, unsigned line, const char *expression, const char *message );
+
+
+void reportTotalTests( const char *suitename, uint64_t numtests );
+
+// $$ these should be set up as readonly accessors
+uint64_t getTotalTests(void);
+uint64_t getFailedTests(void);
+uint64_t getWarnings(void);
+uint64_t getTraceCalls(void);
+
+extern uint64_t g_ModulesCompleted;
+
+#define _TS_TRY
+#define ___TSM_CATCH(f,l,m)
+#define __TSM_CATCH(f,l,m)
+#define __TS_CATCH(f,l)
+#define _TS_CATCH
+#define _TS_CATCH_TYPE(t, b)
+#define _TS_LAST_CATCH(b)
+#define _TS_CATCH_ABORT(b)
+
+// TS_TRACE
+#define TS_TRACE(...) TRACDCOMP( g_trac_test, __VA_ARGS__); CxxTest::doTrace()
+
+
+// TS_WARN
+#define _TS_WARN(f,l,e) CxxTest::doWarn( (f), (l), e )
+#define TS_WARN(e) _TS_WARN( __FILE__, __LINE__, e )
+
+// TS_FAIL
+#define _TS_FAIL(f,l,e) CxxTest::doFailTest( (f), (l), e )
+#define TS_FAIL(e) _TS_FAIL( __FILE__, __LINE__, e )
}
OpenPOWER on IntegriCloud