List all available test units, if none is selected.

From the command line (FreeCADCmd) only which not need the GUI.

A better description

Grammatically improvement

Use PrintMessage
This commit is contained in:
Benjamin Alterauge
2022-05-18 20:48:51 +02:00
committed by Uwe
parent a2623d0a29
commit 086547c490
2 changed files with 17 additions and 1 deletions

View File

@@ -2160,7 +2160,7 @@ void parseProgramOptions(int ac, char ** av, const string& exe, variables_map& v
("log-file", value<string>(), "Unlike --write-log this allows logging to an arbitrary file")
("user-cfg,u", value<string>(),"User config file to load/save user settings")
("system-cfg,s", value<string>(),"System config file to load/save system settings")
("run-test,t", value<string>() ,"Test case - or 0 for all")
("run-test,t", value<string>()->implicit_value(""),"Run a given test case (use 0 (zero) to run all tests). If no argument is provided then return list of all available tests.")
("module-path,M", value< vector<string> >()->composing(),"Additional module paths")
("python-path,P", value< vector<string> >()->composing(),"Additional python paths")
("single-instance", "Allow to run a single instance of the application")
@@ -2394,6 +2394,9 @@ void processProgramOptions(const variables_map& vm, std::map<std::string,std::st
if ( "0" == testCase) {
testCase = "TestApp.All";
}
else if (testCase.empty()) {
testCase = "TestApp.PrintAll";
}
mConfig["TestCase"] = testCase;
mConfig["RunMode"] = "Internal";
mConfig["ScriptFileName"] = "FreeCADTest";