From a4809cd65ce96d0b56ec316b14836087cf1d647b Mon Sep 17 00:00:00 2001 From: Mark Wenning Date: Mon, 6 Jun 2011 14:15:03 -0500 Subject: 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 --- src/usr/example/test/exampletest.H | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'src/usr/example/test') diff --git a/src/usr/example/test/exampletest.H b/src/usr/example/test/exampletest.H index f6cad9863..1df27a52e 100644 --- a/src/usr/example/test/exampletest.H +++ b/src/usr/example/test/exampletest.H @@ -6,7 +6,7 @@ * * @brief Example for people to use when writing test cases for their module. * @todo add more doxygen blocks -*/ + */ #include #include @@ -18,34 +18,35 @@ public: /** - * @test TS_WARN will run if the example1_function FAILS - * */ + * @test TS_WARN will run if the testExampleWarn_function FAILS + */ void testExampleWarn(void) { uint64_t l_rc = 0; l_rc = example1_function(); if(l_rc) { - TS_WARN("Warning, Call to example1_function1 returned bad value.\n"); + TS_WARN("Warning, Call to testExampleWarn returned bad value.\n"); } } /** - * @test TS_TRACE will run if the example1_function FAILS - * */ + * @test TS_TRACE will run if the testExampleTrace function FAILS + * + */ void testExampleTrace(void) { uint64_t l_rc = 0; l_rc = example1_function(); if(l_rc) { - TS_TRACE("Tracing something in example1_function1\n"); + TS_TRACE("Tracing a failure in testExampleTrace function1\n"); } } /** - * @test TS_FAIL will run if the example1_function FAILS + * @test TS_FAIL will run if the testExampleFail function FAILS */ void testExampleFail(void) { @@ -53,11 +54,11 @@ public: l_rc = example1_function(); if(l_rc) { - TS_FAIL("Call to example1_function1 failed!\n"); + TS_FAIL("Call to testExampleFail failed!\n"); } } /** - * @test this will always run TS_FAIL + * @test this will always run TS_FAIL */ void testExampleForceFail(void) { @@ -66,7 +67,7 @@ public: } /** - * @test this will always run TS_WARN + * @test this will always run TS_WARN */ void testExampleForceWarn(void) { @@ -74,12 +75,20 @@ public: TS_WARN("Run TS_WARN() as part of the example test\n" ); } /** - * @test this will always run TS_WARN + * @test this will always run TS_TRACE */ void testExampleForceTrace(void) { + uint32_t i_32test = 0xdeadbeef; + uint64_t i_64test = 0xbadc0ffee0ddf00d; TS_TRACE("Run TS_TRACE() as part of the example test\n" ); + + TS_TRACE("Run TS_TRACE() with one print parameter: %d\n", 5 ); + + TS_TRACE("Run TS_TRACE() with 2 parameters: 0x%x 0x%x \n", i_32test, 0x78 ); + + TS_TRACE("Run TS_TRACE() with 3 parameters: %d, 0x%llx, %p", 328, i_64test, &i_64test ); } -- cgit v1.2.3