Testing
Update tests so it uses llfs data and lffs
This commit is contained in:
@@ -23,9 +23,11 @@ const char* TAG = "llfs";
|
||||
static size_t file_count = 0; // Cache for the number of files in the filesystem
|
||||
static FILE* file_table[POSIX_MAX_FILES];
|
||||
|
||||
#ifndef TESTING
|
||||
static int new_file_table_entry(void);
|
||||
static int free_file_table_entry(int file_id);
|
||||
static FILE* file_id_to_stream(int file_id);
|
||||
#endif
|
||||
static uint8_t file_ext_cmp(const char* filename, const char* ext);
|
||||
|
||||
int8_t llfs_init(void) {
|
||||
@@ -141,6 +143,7 @@ size_t llfs_file_count(void) {
|
||||
return file_count;
|
||||
}
|
||||
|
||||
#ifndef TESTING
|
||||
/**
|
||||
* @brief Newlib open implementation
|
||||
*
|
||||
@@ -409,6 +412,7 @@ static FILE* file_id_to_stream(int file_id) {
|
||||
}
|
||||
return file_table[file_id];
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Check if a filename ends with a given extension
|
||||
@@ -433,3 +437,4 @@ static uint8_t file_ext_cmp(const char* const filename, const char* const ext) {
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
|
||||
#define LOGGER_LEVEL_ALL
|
||||
#include "tftp.h"
|
||||
#ifdef TESTING
|
||||
#include "mocs.h"
|
||||
#endif
|
||||
|
||||
#define VIRT_INDEX_TXT 0
|
||||
#define VIRT_IMAGE_BMP 1
|
||||
|
||||
Reference in New Issue
Block a user