From 2d230c7c6ddba3beae032ac666a51a675afe9737 Mon Sep 17 00:00:00 2001 From: Patrick Kappl Date: Sat, 7 Dec 2024 18:25:48 +0000 Subject: [PATCH] Remove deprecated `FileSystem.test.cpp` --- Tests/HardwareTests/CMakeLists.txt | 7 -- Tests/HardwareTests/FileSystem.test.cpp | 92 ------------------------- 2 files changed, 99 deletions(-) delete mode 100644 Tests/HardwareTests/FileSystem.test.cpp diff --git a/Tests/HardwareTests/CMakeLists.txt b/Tests/HardwareTests/CMakeLists.txt index 806b653e..38229786 100644 --- a/Tests/HardwareTests/CMakeLists.txt +++ b/Tests/HardwareTests/CMakeLists.txt @@ -59,13 +59,6 @@ target_link_libraries( ) add_watchdog_version_of(Eps) -add_program(FileSystem FileSystem.test.cpp) -target_link_libraries( - Sts1CobcSwTests_FileSystem PRIVATE rodos::rodos littlefs::littlefs Sts1CobcSw_FileSystem - Sts1CobcSwTests_RfLatchupDisablePin -) -add_watchdog_version_of(FileSystem) - add_program(Flash Flash.test.cpp) target_link_libraries( Sts1CobcSwTests_Flash PRIVATE rodos::rodos Sts1CobcSw_Periphery Sts1CobcSw_Serial diff --git a/Tests/HardwareTests/FileSystem.test.cpp b/Tests/HardwareTests/FileSystem.test.cpp deleted file mode 100644 index 3a4a72b1..00000000 --- a/Tests/HardwareTests/FileSystem.test.cpp +++ /dev/null @@ -1,92 +0,0 @@ -#include - -#include - -#include - -#include - -#include - - -namespace sts1cobcsw -{ -using RODOS::PRINTF; - - -constexpr std::size_t stackSize = 5'000; - - -class FileSystemTest : public RODOS::StaticThread -{ -public: - FileSystemTest() : StaticThread("FileSystemTest") - { - } - -private: - void init() override - { - InitializeRfLatchupDisablePins(); - fs::deprecated::Initialize(); - } - - - void run() override - { - EnableRfLatchupProtection(); - - PRINTF("\n"); - PRINTF("File system test\n"); - - auto errorCode = fs::deprecated::Mount(); - if(errorCode < 0) - { - fs::deprecated::Format(); - } - - PRINTF("\n"); - fs::deprecated::Ls("/"); - - auto const * directoryPath = "MyFolder"; - PRINTF("\n"); - PRINTF("Creating directory '%s' ...\n", directoryPath); - fs::deprecated::CreateDirectory(directoryPath); - fs::deprecated::Ls("/"); - - auto const * filePath = "MyFolder/MyFile"; - PRINTF("\n"); - PRINTF("Creating file '%s' ...\n", filePath); - fs::deprecated::OpenFile(filePath, LFS_O_WRONLY | LFS_O_CREAT); - - PRINTF("Writing to file ...\n"); - int number = 123; - fs::deprecated::WriteToFile(number); - number = 456; - fs::deprecated::WriteToFile(number); - fs::deprecated::CloseFile(); - - PRINTF("Reading from file ...\n"); - fs::deprecated::OpenFile(filePath, LFS_O_RDONLY); - fs::deprecated::ReadFromFile(&number); - PRINTF(" number = %d == 123\n", number); - fs::deprecated::ReadFromFile(&number); - PRINTF(" number = %d == 456\n", number); - fs::deprecated::CloseFile(); - - fs::deprecated::Ls(directoryPath); - - PRINTF("\n"); - PRINTF("Deleting file '%s' ...\n", filePath); - fs::deprecated::Remove(filePath); - fs::deprecated::Ls(directoryPath); - - PRINTF("\n"); - PRINTF("Deleting directory '%s' ...\n", directoryPath); - fs::deprecated::Remove(directoryPath); - fs::deprecated::Ls("/"); - - fs::deprecated::Unmount(); - } -} fileSystemTest; -}