diff options
author | Francis Murtagh <francis.murtagh@arm.com> | 2023-07-04 13:35:32 +0100 |
---|---|---|
committer | Francis Murtagh <francis.murtagh@arm.com> | 2023-07-04 13:14:50 +0000 |
commit | 22c8a4b48efe4c6cfa563c734e771e77f4d7c1b0 (patch) | |
tree | ede5d1ffb325c441cb3032453834f1ed92d88694 | |
parent | 988354de127528bdebb98fd25661fbf2f39f17dd (diff) | |
download | armnn-22c8a4b48efe4c6cfa563c734e771e77f4d7c1b0.tar.gz |
IVGCVSW-7862 Replacing use of std::filesystem with ghc::filesystem
Even though we're using C++ 17 we still do a Debian buster build. This
prevents using some new libraries. In this case std::filesystem.
Change-Id: Icbdcac8a53d5931f25f8aa77c7422aa0b8ae94d4
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
-rw-r--r-- | tests/ExecuteNetwork/test/FileComparisonExecutorTests.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/ExecuteNetwork/test/FileComparisonExecutorTests.cpp b/tests/ExecuteNetwork/test/FileComparisonExecutorTests.cpp index c8a7171107..bd435e139a 100644 --- a/tests/ExecuteNetwork/test/FileComparisonExecutorTests.cpp +++ b/tests/ExecuteNetwork/test/FileComparisonExecutorTests.cpp @@ -5,12 +5,13 @@ #include <ExecuteNetwork/FileComparisonExecutor.hpp> #include <doctest/doctest.h> -#include <filesystem> #include <fstream> +#include <ghc/filesystem.hpp> + namespace { -namespace fs = std::filesystem; +namespace fs = ghc::filesystem; TEST_SUITE("FileComparisonExecutorTests") { @@ -34,7 +35,7 @@ TEST_SUITE("FileComparisonExecutorTests") TEST_CASE("ComparisonFileIsEmpty") { - std::filesystem::path fileName = fs::temp_directory_path().append("ComparisonFileIsEmpty.tmp"); + ghc::filesystem::path fileName = fs::temp_directory_path().append("ComparisonFileIsEmpty.tmp"); std::fstream tmpFile; tmpFile.open(fileName, std::ios::out); ExecuteNetworkParams params; @@ -44,12 +45,12 @@ TEST_SUITE("FileComparisonExecutorTests") // can't read a header. CHECK_THROWS_AS(classToTest.Execute(), armnn::ParseException); tmpFile.close(); - std::filesystem::remove(fileName); + ghc::filesystem::remove(fileName); } TEST_CASE("ComparisonFileHasValidHeaderAndData") { - std::filesystem::path fileName = fs::temp_directory_path().append("ComparisonFileHasValidHeaderAndData.tmp"); + ghc::filesystem::path fileName = fs::temp_directory_path().append("ComparisonFileHasValidHeaderAndData.tmp"); std::fstream tmpFile; tmpFile.open(fileName, std::ios::out); // Write a valid header. @@ -60,7 +61,7 @@ TEST_SUITE("FileComparisonExecutorTests") FileComparisonExecutor classToTest(params); // The read in tensor should consist of 1 float. std::vector<const void*> results = classToTest.Execute(); - std::filesystem::remove(fileName); + ghc::filesystem::remove(fileName); // Should be one tensor in the data. CHECK_EQ(1, results.size()); // We expect there to be 1 element of value 1.1f. |