summaryrefslogtreecommitdiffstats
path: root/src/usr/cxxtest
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-05-16 14:32:30 -0500
committerMark W. Wenning <wenning@us.ibm.com>2011-05-18 10:14:20 -0500
commit82fa0190a4ad346500a9b5d75abc9f85c23b08e8 (patch)
treec2412b51c0163afcd6d9868847c148e0dc0b616f /src/usr/cxxtest
parent523f96160485edfd91adf1f789f9200fc80ba6e1 (diff)
downloadtalos-hostboot-82fa0190a4ad346500a9b5d75abc9f85c23b08e8.tar.gz
talos-hostboot-82fa0190a4ad346500a9b5d75abc9f85c23b08e8.zip
Execute all libtest* modules when hbicore_test image starts.
Change-Id: I6da56a396d9c6bb6a274e3a27d447d6e78d63203 Reviewed-on: http://gfwr801.rchland.ibm.com:8080/gerrit/76 Tested-by: Jenkins Server Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com> Reviewed-by: Mark W. Wenning <wenning@us.ibm.com>
Diffstat (limited to 'src/usr/cxxtest')
-rw-r--r--src/usr/cxxtest/cxxtestexec.C26
-rw-r--r--src/usr/cxxtest/makefile2
2 files changed, 27 insertions, 1 deletions
diff --git a/src/usr/cxxtest/cxxtestexec.C b/src/usr/cxxtest/cxxtestexec.C
new file mode 100644
index 000000000..371bb1274
--- /dev/null
+++ b/src/usr/cxxtest/cxxtestexec.C
@@ -0,0 +1,26 @@
+#include <sys/vfs.h>
+#include <sys/task.h>
+#include <string.h>
+
+/* Iterate through all modules in the VFS named "libtest*" and create children
+ * tasks to execute them.
+ */
+extern "C"
+void _start(void*)
+{
+ VfsSystemModule* vfsItr = &VFS_MODULES[0];
+
+ while(vfsItr->module[0] != '\0')
+ {
+ if (0 == memcmp(vfsItr->module, "libtest", 7))
+ {
+ if (NULL != vfsItr->start)
+ {
+ task_exec(vfsItr->module, NULL);
+ }
+ }
+ vfsItr++;
+ }
+
+ task_end();
+}
diff --git a/src/usr/cxxtest/makefile b/src/usr/cxxtest/makefile
index 1f14e4a6f..f28902c76 100644
--- a/src/usr/cxxtest/makefile
+++ b/src/usr/cxxtest/makefile
@@ -1,6 +1,6 @@
ROOTPATH = ../../..
MODULE = cxxtest
-OBJS = TestSuite.o
+OBJS = TestSuite.o cxxtestexec.o
include ${ROOTPATH}/config.mk
OpenPOWER on IntegriCloud