diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-11-19 11:26:18 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-11-19 11:26:18 +0800 |
commit | 81e3fc8bd2c4b2b57cbc934ce1a8e02a0613b576 (patch) | |
tree | 0aadac309e6655e055416d3bc3a07e7e6b1a6523 /tools/testrunner/main.cpp | |
parent | a556787d846e095d9821ce43ce53b8a5cf2ee5ad (diff) | |
download | mrust-81e3fc8bd2c4b2b57cbc934ce1a8e02a0613b576.tar.gz |
testrunner - Correct handle of compiler args, some known failures
Diffstat (limited to 'tools/testrunner/main.cpp')
-rw-r--r-- | tools/testrunner/main.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/testrunner/main.cpp b/tools/testrunner/main.cpp index e0e10f9c..067a63e3 100644 --- a/tools/testrunner/main.cpp +++ b/tools/testrunner/main.cpp @@ -219,8 +219,21 @@ int main(int argc, const char* argv[]) } else if( line.substr(3, 14) == "compile-flags:" ) { - //TODO("Compiler flags - " << line.substr(3+14)); - td.m_extra_flags.push_back( line.substr(3+14) ); + auto end = line.find(' ', 3+14); + decltype(end) start = 3+14; + do + { + if( start != end ) + { + auto a = line.substr(start, end-start); + DEBUG("+" << a); + td.m_extra_flags.push_back(::std::move(a)); + } + if( end == ::std::string::npos ) + break; + start = end + 1; + end = line.find(' ', start); + } while(1); } } while( !in.eof() ); |