-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/std_filesystem_supported_v5.4' into 'release/v5.4'
storage: make std::filesystem supported (v5.4) See merge request espressif/esp-idf!35430
- Loading branch information
Showing
20 changed files
with
718 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# The following five lines of boilerplate have to be in your project's | ||
# CMakeLists in this exact order for cmake to work correctly | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
include($ENV{IDF_PATH}/tools/cmake/project.cmake) | ||
set(COMPONENTS main) | ||
list(PREPEND SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers" "sdkconfig.defaults") | ||
project(std_filesystem_test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
| Supported Targets | ESP32 | ESP32-C3 | | ||
| ----------------- | ----- | -------- | | ||
|
||
This is a test app which verifies that std::filesystem features work in ESP-IDF. The tests are written using [Catch2](https://github.com/catchorg/Catch2) managed [component](https://components.espressif.com/components/espressif/catch2/). | ||
|
||
To run the tests: | ||
|
||
```shell | ||
idf.py flash monitor | ||
``` | ||
|
||
Or, in QEMU: | ||
|
||
```shell | ||
idf.py qemu monitor | ||
``` | ||
|
||
Or, using pytest: | ||
|
||
```shell | ||
idf.py build | ||
pytest --embedded-services idf,qemu --target esp32 --ignore managed_components | ||
``` | ||
|
||
## Feature Support | ||
|
||
Please update `_cplusplus_filesystem` section in cplusplus.rst when modifying this table. | ||
|
||
| Feature | Supported | Tested | Comment | | ||
|------------------------------|-----------|--------|---------------------------------------------------------------------------------------------------------------| | ||
| absolute | y | y | | | ||
| canonical | y | y | | | ||
| weakly_canonical | y | y | | | ||
| relative | y | y | | | ||
| proximate | y | y | | | ||
| copy | y | y | this function has complex behavior, not sure about test coverage | | ||
| copy_file | y | y | | | ||
| copy_symlink | n | n | symlinks are not supported | | ||
| create_directory | y | y | | | ||
| create_directories | y | y | | | ||
| create_hard_link | n | n | hard links are not supported | | ||
| create_symlink | n | n | symlinks are not supported | | ||
| create_directory_symlink | n | n | symlinks are not supported | | ||
| current_path | partial | y | setting path is not supported in IDF | | ||
| exists | y | y | | | ||
| equivalent | y | y | | | ||
| file_size | y | y | | | ||
| hard_link_count | n | n | hard links are not supported | | ||
| last_write_time | y | y | | | ||
| permissions | partial | y | setting permissions is not supported | | ||
| read_symlink | n | n | symlinks are not supported | | ||
| remove | y | y | | | ||
| remove_all | y | y | | | ||
| rename | y | y | | | ||
| resize_file | n | y | doesn't work, toolchain has to be built with _GLIBCXX_HAVE_TRUNCATE | | ||
| space | n | y | doesn't work, toolchain has to be built with _GLIBCXX_HAVE_SYS_STATVFS_H and statvfs function must be defined | | ||
| status | y | y | | | ||
| symlink_status | n | n | symlinks are not supported | | ||
| temp_directory_path | y | y | works if /tmp directory has been mounted | | ||
| directory_iterator | y | y | | | ||
| recursive_directory_iterator | y | y | | | ||
| is_block_file | y | y | | | ||
| is_character_file | y | y | | | ||
| is_directory | y | y | | | ||
| is_empty | y | y | | | ||
| is_fifo | y | y | | | ||
| is_other | n | n | | | ||
| is_regular_file | y | y | | | ||
| is_socket | y | y | | | ||
| is_symlink | y | y | | |
10 changes: 10 additions & 0 deletions
10
tools/test_apps/storage/std_filesystem/main/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
idf_component_register(SRCS | ||
"test_std_filesystem_main.cpp" | ||
"test_ops.cpp" | ||
"test_paths.cpp" | ||
"test_status.cpp" | ||
INCLUDE_DIRS "." | ||
PRIV_REQUIRES vfs fatfs | ||
WHOLE_ARCHIVE) | ||
|
||
fatfs_create_spiflash_image(storage ${CMAKE_CURRENT_LIST_DIR}/test_fs_image FLASH_IN_PROJECT) |
2 changes: 2 additions & 0 deletions
2
tools/test_apps/storage/std_filesystem/main/idf_component.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dependencies: | ||
espressif/catch2: "^3.7.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1234567890 |
Empty file.
Empty file.
Oops, something went wrong.