diff options
author | John Hodge <tpg@mutabah.net> | 2018-02-11 18:24:12 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-02-11 18:24:12 +0800 |
commit | 14fea32f414df2d1e0b8e2669c8fe13132210ae9 (patch) | |
tree | 5334570e9efc50ecbe2a9cfeb78862948bcdff6d | |
parent | b2fd71e31a00a5c48b8404ff62774c4d5a97a60d (diff) | |
download | mrust-14fea32f414df2d1e0b8e2669c8fe13132210ae9.tar.gz |
Testrunner - Allow cherry-picking tests
-rw-r--r-- | tools/testrunner/main.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/testrunner/main.cpp b/tools/testrunner/main.cpp index f7e15105..cb44b73e 100644 --- a/tools/testrunner/main.cpp +++ b/tools/testrunner/main.cpp @@ -27,6 +27,7 @@ struct Options { const char* output_dir = nullptr; const char* input_glob = nullptr; + ::std::vector<::std::string> test_list; const char* exceptions_file = nullptr; bool fail_fast = false; @@ -275,6 +276,11 @@ int main(int argc, const char* argv[]) unsigned n_ok = 0; for(const auto& test : tests) { + if( !opts.test_list.empty() && ::std::find(opts.test_list.begin(), opts.test_list.end(), test.m_name) == opts.test_list.end() ) + { + DEBUG(">> NOT SELECTED"); + continue ; + } if( test.ignore ) { DEBUG(">> IGNORE " << test.m_name); @@ -366,8 +372,9 @@ int Options::parse(int argc, const char* argv[]) } // TODO: Multiple input globs? else { - this->usage_short(); - return 1; + this->test_list.push_back(arg); + //this->usage_short(); + //return 1; } } else if( arg[1] != '-' ) |