[lib][fs] move the existing test code into its own sub module lib/fs/test
No real functional change, just following the pattern of moving unittest code into a sub module that is picked up by the build system when WITH_TESTS is set.
This commit is contained in:
@@ -5,6 +5,9 @@ MODULE := $(LOCAL_DIR)
|
||||
MODULE_SRCS += $(LOCAL_DIR)/debug.c
|
||||
MODULE_SRCS += $(LOCAL_DIR)/fs.c
|
||||
MODULE_SRCS += $(LOCAL_DIR)/shell.c
|
||||
MODULE_SRCS += $(LOCAL_DIR)/test.c
|
||||
|
||||
ifeq ($(call TOBOOL,WITH_TESTS),true)
|
||||
MODULE_DEPS += $(LOCAL_DIR)/test
|
||||
endif
|
||||
|
||||
include make/module.mk
|
||||
|
||||
10
lib/fs/test/rules.mk
Normal file
10
lib/fs/test/rules.mk
Normal file
@@ -0,0 +1,10 @@
|
||||
LOCAL_DIR := $(GET_LOCAL_DIR)
|
||||
|
||||
MODULE := $(LOCAL_DIR)
|
||||
|
||||
MODULE_DEPS += lib/fs
|
||||
MODULE_DEPS += lib/unittest
|
||||
|
||||
MODULE_SRCS += $(LOCAL_DIR)/test.c
|
||||
|
||||
include make/module.mk
|
||||
@@ -11,8 +11,6 @@
|
||||
#include <string.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if WITH_LIB_UNITTEST
|
||||
#include <lib/unittest.h>
|
||||
|
||||
// returns true if the input path passed through the path normalization
|
||||
@@ -109,5 +107,3 @@ BEGIN_TEST_CASE(fs_tests);
|
||||
RUN_TEST(test_path_normalize);
|
||||
RUN_TEST(test_stdio_fs);
|
||||
END_TEST_CASE(fs_tests);
|
||||
|
||||
#endif // WITH_LIB_UNITTEST
|
||||
Reference in New Issue
Block a user