mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #6068 from ethereum/fix-no-color
Fix isoltest --no-color option
This commit is contained in:
commit
6a1e339b9d
@ -52,7 +52,7 @@ IsolTestOptions::IsolTestOptions(std::string* _editor):
|
|||||||
{
|
{
|
||||||
options.add_options()
|
options.add_options()
|
||||||
("help", po::bool_switch(&showHelp), "Show this help screen.")
|
("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<std::string>(_editor)->default_value(editorPath()), "editor for opening test files");
|
("editor", po::value<std::string>(_editor)->default_value(editorPath()), "editor for opening test files");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ namespace test
|
|||||||
|
|
||||||
struct IsolTestOptions: CommonOptions
|
struct IsolTestOptions: CommonOptions
|
||||||
{
|
{
|
||||||
bool formatted = true;
|
bool noColor = false;
|
||||||
bool showHelp = false;
|
bool showHelp = false;
|
||||||
|
|
||||||
IsolTestOptions(std::string* _editor);
|
IsolTestOptions(std::string* _editor);
|
||||||
|
@ -354,14 +354,14 @@ int main(int argc, char const *argv[])
|
|||||||
if (ts.smt && options.disableSMT)
|
if (ts.smt && options.disableSMT)
|
||||||
continue;
|
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;
|
global_stats += *stats;
|
||||||
else
|
else
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << endl << "Summary: ";
|
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;
|
global_stats.successCount << "/" << global_stats.testCount;
|
||||||
cout << " tests successful." << endl;
|
cout << " tests successful." << endl;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user