summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sys/init/init_main.C2
-rw-r--r--src/usr/cxxtest/cxxtestexec.C26
-rw-r--r--src/usr/cxxtest/makefile2
3 files changed, 29 insertions, 1 deletions
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 <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