aboutsummaryrefslogtreecommitdiff
path: root/src/timelineDecoder/tests
diff options
context:
space:
mode:
authorÉanna Ó Catháin <eanna.ocathain@arm.com>2020-04-27 12:54:11 +0100
committerÉanna Ó Catháin <eanna.ocathain@arm.com>2020-04-27 12:54:32 +0100
commit49c52a1e3be742cd7785ccc36c31cbbe495c4003 (patch)
tree5402a98f526a278192a8f27450bf31a1a7a8ed17 /src/timelineDecoder/tests
parent0886ac4c403378ac0df85ab520a5db319be525a4 (diff)
downloadarmnn-49c52a1e3be742cd7785ccc36c31cbbe495c4003.tar.gz
IVGCVSW-4728 Attempt to fix test failures
Change-Id: I0e0d4a8338c7df4f09518d9f84605b3cc002f2b0 Signed-off-by: Éanna Ó Catháin <eanna.ocathain@arm.com>
Diffstat (limited to 'src/timelineDecoder/tests')
-rw-r--r--src/timelineDecoder/tests/JSONTimelineDecoderTests.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/timelineDecoder/tests/JSONTimelineDecoderTests.cpp b/src/timelineDecoder/tests/JSONTimelineDecoderTests.cpp
index 71e76b1943..2d78564a2a 100644
--- a/src/timelineDecoder/tests/JSONTimelineDecoderTests.cpp
+++ b/src/timelineDecoder/tests/JSONTimelineDecoderTests.cpp
@@ -11,6 +11,7 @@
#include <boost/test/unit_test_suite.hpp>
#include <fstream>
+#include <boost/filesystem.hpp>
BOOST_AUTO_TEST_SUITE(JSONTimelineDecoderTests)
@@ -796,8 +797,11 @@ BOOST_AUTO_TEST_CASE(JSONTimelineDecoderTestJSON)
timelineDecoder.PrintJSON(rootEntity);
- std::ifstream inFile;
- inFile.open("/tmp/output.json"); //open the input file
+ boost::filesystem::ifstream inFile;
+ boost::filesystem::path fileDir = boost::filesystem::temp_directory_path();
+ boost::filesystem::path p{fileDir / boost::filesystem::unique_path("output.json")};
+
+ inFile.open(p); //open the input file
std::stringstream strStream;
strStream << inFile.rdbuf(); //read the file