summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2011-07-11 15:43:13 -0500
committerMark W. Wenning <wenning@us.ibm.com>2011-07-25 16:50:09 -0500
commit9c0e69b8cdf3aabcd77c119c3b3425fda66706da (patch)
tree77a5b7f1c4f58da3a74048e54575a5b9a7785f34 /src/lib
parentb679a1729d7aea0870544e886ddb4b03e1ecf4c4 (diff)
downloadtalos-hostboot-9c0e69b8cdf3aabcd77c119c3b3425fda66706da.tar.gz
talos-hostboot-9c0e69b8cdf3aabcd77c119c3b3425fda66706da.zip
Cleanup from previous reviews, add barrier for CxxTest
- add IStep1 for demo - cleanup: remove inheritance, add errlog tags, etc. - inadvertently ran copyright script, this is OK. - more cleanup: indentation, etc. - add barrier for CxxTests - rename cxxtest_stub.C to cxxtest_data.C - merge problems on gerrit - fix review comments Change-Id: Iee988b8595d8c6dd521fd94d4d58cb403898d948 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/207 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cxxtest_data.C55
-rw-r--r--src/lib/cxxtest_stub.C11
-rw-r--r--src/lib/makefile19
3 files changed, 73 insertions, 12 deletions
diff --git a/src/lib/cxxtest_data.C b/src/lib/cxxtest_data.C
new file mode 100644
index 000000000..7ba2c6c6e
--- /dev/null
+++ b/src/lib/cxxtest_data.C
@@ -0,0 +1,55 @@
+/****************************************************************************
+ * $IBMCopyrightBlock:
+ *
+ * IBM Confidential
+ *
+ * Licensed Internal Code Source Materials
+ *
+ * IBM HostBoot Licensed Internal Code
+ *
+ * (C) Copyright IBM Corp. 2011
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ * $
+****************************************************************************/
+
+#include <stdint.h>
+/**
+ * @brief global vars to keep track of unit tests,
+ *
+ * @see TestSuite.H and TestSuite.C
+ *
+ * These are now also being used in the main code to record failed modules.
+ *
+ * @var g_TotalTests - initialized to 0, updated by reportTotalTests().
+ * Each test suite will call reporttotaltests after all tests have
+ * run with the total number of tests for that suite.
+ * Once all the testsuites have run, the global totaltests will hold
+ * the total of number of unit tests for that run.
+ *
+ * Each unit test macro (TS_TRACE, TS_WARN, and TS_FAIL) will update
+ * the proper variable. At the end the unit tester will print out
+ * the totals.
+ *
+ * @var g_TraceCalls - updated by TS_TRACE macro
+ *
+ * @var g_Warnings - updated by TS_WARN macro
+ *
+ * @var g_FailedTests - updated by TS_FAIL macro in the unit test image.
+ * This variable is also used to allow a code in a binary image
+ * not containing the testcase modules to query the number of failed tests
+ *
+ */
+
+namespace CxxTest
+{
+
+uint64_t g_TotalTests = 0;
+uint64_t g_TraceCalls = 0;
+uint64_t g_Warnings = 0;
+uint64_t g_FailedTests = 0;
+
+}
+
diff --git a/src/lib/cxxtest_stub.C b/src/lib/cxxtest_stub.C
deleted file mode 100644
index cbc98baee..000000000
--- a/src/lib/cxxtest_stub.C
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <stdint.h>
-
-namespace CxxTest
-{
-
-// This variable is to allow a code in a binary image not containing the
-// testcase modules to query the number of failed tests
-uint64_t g_FailedTests = 0;
-
-}
-
diff --git a/src/lib/makefile b/src/lib/makefile
index d4c4f70cb..67b412a3d 100644
--- a/src/lib/makefile
+++ b/src/lib/makefile
@@ -1,8 +1,25 @@
+#############################################################################
+# $IBMCopyrightBlock:
+#
+# IBM Confidential
+#
+# Licensed Internal Code Source Materials
+#
+# IBM HostBoot Licensed Internal Code
+#
+# (C) Copyright IBM Corp. 2010 - 2011
+#
+# The source code for this program is not published or other-
+# wise divested of its trade secrets, irrespective of what has
+# been deposited with the U.S. Copyright Office.
+#$
+#############################################################################
+
ROOTPATH = ../..
OBJS = string.o stdlib.o assert.o stdio.o
OBJS += syscall_stub.o syscall_task.o syscall_msg.o
OBJS += syscall_mmio.o syscall_time.o sync.o syscall_misc.o
-OBJS += cxxtest_stub.o
+OBJS += cxxtest_data.o
include ${ROOTPATH}/config.mk
OpenPOWER on IntegriCloud