mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 14:33:52 +01:00
tests/vfs_default: add compile test for vfs_default
This commit is contained in:
parent
0bbcc4d924
commit
5b3c838043
9
tests/vfs_default/Makefile
Normal file
9
tests/vfs_default/Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
include ../Makefile.tests_common
|
||||
|
||||
USEMODULE += vfs_default
|
||||
USEMODULE += vfs_auto_format
|
||||
|
||||
USEMODULE += shell
|
||||
USEMODULE += shell_commands
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
11
tests/vfs_default/Makefile.ci
Normal file
11
tests/vfs_default/Makefile.ci
Normal file
@ -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 \
|
||||
#
|
||||
42
tests/vfs_default/main.c
Normal file
42
tests/vfs_default/main.c
Normal file
@ -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 <benjamin.valentin@ml-pa.com>
|
||||
* @}
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#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;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user