Skip to content

Commit

Permalink
Fix cmake test download rule
Browse files Browse the repository at this point in the history
Fix parsing of windows-generated files on linux

Change-Id: I700fd42d4da72566ce8a4370d3c7dbb3f2a233b2
  • Loading branch information
ev-mp committed Apr 17, 2018
1 parent 23eef17 commit 880f99b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion unit-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ foreach(i ${PP_Tests_List})
#Each test comprise of a sequence of frame indexed according to the following
foreach(idx ${PP_Test_Sequence_Index_List})
# Calculate the target full path name for deployment
set(Test_File_Name "${Test_Pattern}${ext}")
set(Test_File_Name "${Test_Pattern}${idx}${ext}")
set(source ${PP_TESTS_URL}${Test_File_Name})
set(destination ${Deployment_Location}${Test_File_Name})
#message(STATUS "Checking for a required test record ${Test_File_Name}")
Expand Down
5 changes: 3 additions & 2 deletions unit-tests/unit-tests-post-processing.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,15 @@ inline ppf_test_config attrib_from_csv(const std::string& str)
std::string line;
int invalid_line = 0;

std::string key, value;
while (true)
{
std::string key, value;

if (!std::getline(data, key, ','))
invalid_line++;

std::getline(data, value, '\n');
std::stringstream ss(value); // trim EOL discrepancies
ss >> value;
dict[key] = value;

if (invalid_line > 1) // Two or more non-kvp lines designate eof. Note this when creating the attributes
Expand Down

0 comments on commit 880f99b

Please sign in to comment.