[fs][tests] break some fs tests into their own module
Include the test modules if the overal virtual/test module is included. Also set a new global build system var along with a configuration variable.
This commit is contained in:
@@ -7,6 +7,10 @@ MODULE_DEPS += lib/bio
|
||||
MODULE_DEPS += lib/fs
|
||||
MODULE_DEPS += lib/libcpp
|
||||
|
||||
ifeq ($(call TOBOOL,WITH_TESTS),true)
|
||||
MODULE_DEPS += $(LOCAL_DIR)/test
|
||||
endif
|
||||
|
||||
MODULE_SRCS += $(LOCAL_DIR)/dir.cpp
|
||||
MODULE_SRCS += $(LOCAL_DIR)/fat.cpp
|
||||
MODULE_SRCS += $(LOCAL_DIR)/file.cpp
|
||||
|
||||
9
lib/fs/fat/test/rules.mk
Normal file
9
lib/fs/fat/test/rules.mk
Normal file
@@ -0,0 +1,9 @@
|
||||
LOCAL_DIR := $(GET_LOCAL_DIR)
|
||||
|
||||
MODULE := $(LOCAL_DIR)
|
||||
|
||||
MODULE_DEPS += lib/fs/fat
|
||||
|
||||
MODULE_SRCS += $(LOCAL_DIR)/test.cpp
|
||||
|
||||
include make/module.mk
|
||||
0
lib/fs/fat/test/test.cpp
Normal file
0
lib/fs/fat/test/test.cpp
Normal file
@@ -2,12 +2,14 @@ LOCAL_DIR := $(GET_LOCAL_DIR)
|
||||
|
||||
MODULE := $(LOCAL_DIR)
|
||||
|
||||
MODULE_SRCS += \
|
||||
$(LOCAL_DIR)/spifs.c \
|
||||
MODULE_SRCS += $(LOCAL_DIR)/spifs.c
|
||||
|
||||
MODULE_DEPS += \
|
||||
lib/fs \
|
||||
lib/cksum \
|
||||
lib/bio
|
||||
ifeq ($(call TOBOOL,WITH_TESTS),true)
|
||||
MODULE_DEPS += $(LOCAL_DIR)/test
|
||||
endif
|
||||
|
||||
MODULE_DEPS += lib/bio
|
||||
MODULE_DEPS += lib/cksum
|
||||
MODULE_DEPS += lib/fs
|
||||
|
||||
include make/module.mk
|
||||
|
||||
@@ -2,9 +2,7 @@ include project/target/stm32f746g-disco.mk
|
||||
include project/virtual/test.mk
|
||||
include project/virtual/minip.mk
|
||||
|
||||
MODULES += \
|
||||
lib/fs \
|
||||
app/loader
|
||||
MODULES += app/loader
|
||||
|
||||
include project/virtual/fs.mk
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# modules related to a file system layer
|
||||
# modules related to a file system layer some file system implementations
|
||||
|
||||
MODULES += \
|
||||
lib/fs \
|
||||
lib/fs/ext2 \
|
||||
lib/fs/fat \
|
||||
lib/fs/spifs \
|
||||
lib/fs/spifs/test \
|
||||
lib/fs/memfs
|
||||
|
||||
|
||||
@@ -11,3 +11,9 @@ MODULES += \
|
||||
lib/debugcommands \
|
||||
lib/unittest \
|
||||
lib/version
|
||||
|
||||
# set a build system variable for other modules to include test code
|
||||
# on their own.
|
||||
WITH_TESTS := true
|
||||
GLOBAL_DEFINES += WITH_TESTS=1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user