Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision 50661ab8590db56556df35c9b7fe8dd1f940ea72)
+++ kernel/generic/src/console/cmd.c	(revision 34db7fa828e4d10ee2a902fb4143704b3feda184)
@@ -68,4 +68,8 @@
 #ifdef CONFIG_TEST
 #include <test.h>
+#endif
+
+#ifdef CONFIG_BENCH
+#include <arch/cycle.h>
 #endif
 
@@ -859,4 +863,25 @@
 }
 
+static bool run_test(const test_t * test)
+{
+	printf("%s\t\t%s\n", test->name, test->desc);
+#ifdef CONFIG_BENCH
+	uint64_t t0 = get_cycle();
+#endif
+	char * ret = test->entry();
+#ifdef CONFIG_BENCH
+	uint64_t dt = get_cycle() - t0;
+	printf("Time: %llu cycles\n", dt);
+#endif
+	
+	if (ret == NULL) {
+		printf("Test passed\n");
+		return true;
+	}
+
+	printf("%s\n", ret);
+	return false;
+}
+
 /** Command for returning kernel tests
  *
@@ -872,6 +897,7 @@
 		for (test = tests; test->name != NULL; test++) {
 			if (test->safe) {
-				printf("\n%s\t\t%s\n\n", test->name, test->desc);
-				test->entry();
+				printf("\n");
+				if (!run_test(test))
+					break;
 			}
 		}
@@ -882,5 +908,5 @@
 			if (strcmp(test->name, argv->buffer) == 0) {
 				fnd = true;
-				test->entry();
+				run_test(test);
 				break;
 			}
@@ -888,5 +914,5 @@
 		
 		if (!fnd)
-			printf("Unknown test.\n");
+			printf("Unknown test\n");
 	}
 	
