From 7a40088d95112e6a1a83a759f58db099ce241009 Mon Sep 17 00:00:00 2001 From: Mathias Baumann Date: Thu, 21 Feb 2019 16:42:23 +0100 Subject: [PATCH] Fix isoltest --no-color option --- test/tools/IsolTestOptions.cpp | 2 +- test/tools/IsolTestOptions.h | 2 +- test/tools/isoltest.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/tools/IsolTestOptions.cpp b/test/tools/IsolTestOptions.cpp index 939910136..dee4a01e1 100644 --- a/test/tools/IsolTestOptions.cpp +++ b/test/tools/IsolTestOptions.cpp @@ -52,7 +52,7 @@ IsolTestOptions::IsolTestOptions(std::string* _editor): { options.add_options() ("help", po::bool_switch(&showHelp), "Show this help screen.") - ("no-color", po::bool_switch(&formatted), "don't use colors") + ("no-color", po::bool_switch(&noColor), "don't use colors") ("editor", po::value(_editor)->default_value(editorPath()), "editor for opening test files"); } diff --git a/test/tools/IsolTestOptions.h b/test/tools/IsolTestOptions.h index 58bc24e2e..a13ff2a25 100644 --- a/test/tools/IsolTestOptions.h +++ b/test/tools/IsolTestOptions.h @@ -28,7 +28,7 @@ namespace test struct IsolTestOptions: CommonOptions { - bool formatted = true; + bool noColor = false; bool showHelp = false; IsolTestOptions(std::string* _editor); diff --git a/test/tools/isoltest.cpp b/test/tools/isoltest.cpp index 66d8eba7e..9c212346c 100644 --- a/test/tools/isoltest.cpp +++ b/test/tools/isoltest.cpp @@ -354,14 +354,14 @@ int main(int argc, char const *argv[]) if (ts.smt && options.disableSMT) continue; - if (auto stats = runTestSuite(ts.title, options.testPath / ts.path, ts.subpath, options.ipcPath.string(), ts.testCaseCreator, options.formatted)) + if (auto stats = runTestSuite(ts.title, options.testPath / ts.path, ts.subpath, options.ipcPath.string(), ts.testCaseCreator, !options.noColor)) global_stats += *stats; else return 1; } cout << endl << "Summary: "; - AnsiColorized(cout, options.formatted, {BOLD, global_stats ? GREEN : RED}) << + AnsiColorized(cout, !options.noColor, {BOLD, global_stats ? GREEN : RED}) << global_stats.successCount << "/" << global_stats.testCount; cout << " tests successful." << endl;