summaryrefslogtreecommitdiff
path: root/src/init/shell.c
diff options
context:
space:
mode:
authordzwdz2021-10-15 18:43:21 +0200
committerdzwdz2021-10-15 18:43:21 +0200
commite9ae64908cb116174d2d18be3d727d988e96108b (patch)
treed7064ac13509eae75071653d340c3e5e9bc75c9a /src/init/shell.c
parent42bf65918f96d43e9ce8a7287a9508f44fe670d5 (diff)
init: only run tests when prompted from the shell
Diffstat (limited to 'src/init/shell.c')
-rw-r--r--src/init/shell.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/init/shell.c b/src/init/shell.c
index 9510e0d..53ad995 100644
--- a/src/init/shell.c
+++ b/src/init/shell.c
@@ -1,5 +1,6 @@
#include <init/shell.h>
#include <init/stdlib.h>
+#include <init/tests/main.h>
#include <shared/syscalls.h>
static char *split(char *base) {
@@ -76,6 +77,8 @@ void shell_loop(void) {
if (_syscall_fork())
_syscall_await();
else level++;
+ } else if (!strcmp(cmd, "run_tests")) {
+ test_all();
} else {
printf("unknown command :(\n");
}