tests: fat_fs_api: Conditionally compile MKFS test

MKFS testing inappropriately uses flash API in the FAT FS API test,
causing build errors for the test when testing file systems on storage
devices other than flash. Hotfix by making this part of the test
conditional on CONFIG_FLASH.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit is contained in:
Declan Snyder 2022-12-13 13:23:08 -06:00 committed by Carles Cufí
commit ff830fb0f8

View file

@ -5,7 +5,5 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(fat_fs_api)
FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE
${app_sources}
../common/test_fs_open_flags.c
../common/test_fs_mkfs.c)
target_sources(app PRIVATE ${app_sources} ../common/test_fs_open_flags.c)
target_sources_ifdef(CONFIG_FLASH app PRIVATE ../common/test_fs_mkfs.c)