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() | ||||
| 		("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"); | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -28,7 +28,7 @@ namespace test | ||||
| 
 | ||||
| struct IsolTestOptions: CommonOptions | ||||
| { | ||||
| 	bool formatted = true; | ||||
| 	bool noColor = false; | ||||
| 	bool showHelp = false; | ||||
| 
 | ||||
| 	IsolTestOptions(std::string* _editor); | ||||
|  | ||||
| @ -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; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user