From 82fa0190a4ad346500a9b5d75abc9f85c23b08e8 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Mon, 16 May 2011 14:32:30 -0500 Subject: 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 Reviewed-by: Mark W. Wenning --- src/sys/init/init_main.C | 2 ++ src/usr/cxxtest/cxxtestexec.C | 26 ++++++++++++++++++++++++++ src/usr/cxxtest/makefile | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/usr/cxxtest/cxxtestexec.C diff --git a/src/sys/init/init_main.C b/src/sys/init/init_main.C index d8f540053..aae7f729e 100644 --- a/src/sys/init/init_main.C +++ b/src/sys/init/init_main.C @@ -62,6 +62,8 @@ void init_main(void* unused) */ task_exec("libexample.so", NULL); + + task_exec("libcxxtest.so", NULL); while(1) task_yield(); 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 +#include +#include + +/* 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 -- cgit v1.2.1