diff --git a/tests/vfs_default/Makefile b/tests/vfs_default/Makefile new file mode 100644 index 0000000000..99cf7835a2 --- /dev/null +++ b/tests/vfs_default/Makefile @@ -0,0 +1,9 @@ +include ../Makefile.tests_common + +USEMODULE += vfs_default +USEMODULE += vfs_auto_format + +USEMODULE += shell +USEMODULE += shell_commands + +include $(RIOTBASE)/Makefile.include diff --git a/tests/vfs_default/Makefile.ci b/tests/vfs_default/Makefile.ci new file mode 100644 index 0000000000..28dd3afe00 --- /dev/null +++ b/tests/vfs_default/Makefile.ci @@ -0,0 +1,11 @@ +BOARD_INSUFFICIENT_MEMORY := \ + arduino-leonardo \ + arduino-nano \ + atmega328p-xplained-mini \ + arduino-duemilanove \ + arduino-uno \ + atmega328p \ + stm32f030f4-demo \ + samd10-xmini \ + nucleo-l011k4 \ + # diff --git a/tests/vfs_default/main.c b/tests/vfs_default/main.c new file mode 100644 index 0000000000..3cf3746e4b --- /dev/null +++ b/tests/vfs_default/main.c @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2022 ML!PA Consulting GmbH + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup tests + * @{ + * + * @file + * @brief Test application for vfs_default + * + * @author Benjamin Valentin + * @} + */ + +#include + +#include "shell.h" +#include "shell_commands.h" +#include "vfs_default.h" + +int main(void) +{ + vfs_DIR mount = {0}; + + /* list mounted file systems */ + puts("mount points:"); + while (vfs_iterate_mount_dirs(&mount)) { + printf("\t%s\n", mount.mp->mount_point); + } + printf("\ndata dir: %s\n", VFS_DEFAULT_DATA); + + /* start the shell */ + char line_buf[SHELL_DEFAULT_BUFSIZE]; + shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE); + + return 0; +}