Remove the obsolete --timeout command-line option

This option has never been supported in any tagged release of Wesnoth:
* added in e5b3951054
* changed to only print a warning in c8699e2f05

(cherry picked from commit 6576293228)
This commit is contained in:
Steve Cotton 2019-11-19 02:32:45 +01:00
parent b90b6c6bc6
commit 6333400f64
4 changed files with 2 additions and 20 deletions

View file

@ -500,9 +500,7 @@ and 1 indicates that the test failed. An exit status of 3 indicates that the tes
replay file. An exit status of 4 indicates that the test passed, but the replay produced errors. These latter
two are only returned if
.B --noreplaycheck
is not passed. An exit status of 2 indicates that the test timed out, when used with the deprecated
.B --timeout
option.
is not passed.
.
.SH AUTHOR
.

View file

@ -259,9 +259,8 @@ commandline_options::commandline_options (const std::vector<std::string>& args)
po::options_description testing_opts("Testing options");
testing_opts.add_options()
("test,t", po::value<std::string>()->implicit_value(std::string()), "runs the game in a small test scenario. If specified, scenario <arg> will be used instead.")
("unit,u", po::value<std::string>()->implicit_value(std::string()), "runs a unit test scenario. Works like test, except that the exit code of the program reflects the victory / defeat conditions of the scenario.\n\t0 - PASS\n\t1 - FAIL\n\t2 - FAIL (TIMEOUT)\n\t3 - FAIL (INVALID REPLAY)\n\t4 - FAIL (ERRORED REPLAY)")
("unit,u", po::value<std::string>()->implicit_value(std::string()), "runs a unit test scenario. Works like test, except that the exit code of the program reflects the victory / defeat conditions of the scenario.\n\t0 - PASS\n\t1 - FAIL\n\t3 - FAIL (INVALID REPLAY)\n\t4 - FAIL (ERRORED REPLAY)")
("showgui", "don't run headlessly (for debugging a failing test)")
("timeout", po::value<unsigned int>(), "sets a timeout (milliseconds) for the unit test. (DEPRECATED)")
("log-strict", po::value<std::string>(), "sets the strict level of the logger. any messages sent to log domains of this level or more severe will cause the unit test to fail regardless of the victory result.")
("noreplaycheck", "don't try to validate replay of unit test.")
("mp-test", "load the test mp scenarios.")
@ -460,8 +459,6 @@ commandline_options::commandline_options (const std::vector<std::string>& args)
}
if (vm.count("showgui"))
headless_unit_test = false;
if (vm.count("timeout"))
timeout = vm["timeout"].as<unsigned int>();
if (vm.count("noreplaycheck"))
noreplaycheck = true;
if (vm.count("turns"))

View file

@ -189,8 +189,6 @@ public:
boost::optional<std::string> unit_test;
/// True if --unit is used and --showgui is not present.
bool headless_unit_test;
/// Non-empty if --timeout was given on the command line. Dependent on --unit.
boost::optional<unsigned int> timeout;
/// True if --noreplaycheck was given on the command line. Dependent on --unit.
bool noreplaycheck;
/// True if --mp-test was given on the command line.

View file

@ -766,17 +766,6 @@ static int do_gameloop(const std::vector<std::string>& args)
plugins.play_slice();
if(cmdline_opts.unit_test) {
if(cmdline_opts.timeout) {
std::cerr << "The wesnoth built-in timeout feature has been removed.\n" << std::endl;
std::cerr << "Please use a platform-specific script which will kill the overtime process instead.\n"
<< std::endl;
std::cerr << "For examples in bash, or in windows cmd, see the forums, or the wesnoth repository."
<< std::endl;
std::cerr
<< "The bash script is called `run_wml_tests`, the windows script is part of the VC project.\n"
<< std::endl;
}
int worker_result = game->unit_test();
std::cerr << ((worker_result == 0) ? "PASS TEST " : "FAIL TEST ")
<< ((worker_result == 3) ? "(INVALID REPLAY)" : "")