Commit graph

67 commits

Author SHA1 Message Date
Chris Beck
987e34a3e3 fixup travis unit tests
- travis runs tests not in verbose mode,
  *but* if there is a failure,
  then it runs in very verbose mode, with strict mode off, to get
  errors reported in the travis log.
- run_wml_tests points out that if you don't run in strict mode,
  some tests may not fail as expected, so the count at the end
  may differ
2014-05-19 19:14:13 -04:00
Chris Beck
f053667408 add option to run_wml_tests to change wesnoth binary / binary path 2014-05-15 11:58:25 -04:00
Chris Beck
4c224247ae fixup minor issues with wml test script
- Use printf for formatting when a test fails
- Rename some variables
- Make sure all variables are quoted when used
2014-05-15 11:31:54 -04:00
Chris Beck
d2666bd28f run_wml_tests forwards extra arguments on to wesnoth 2014-05-14 23:42:46 -04:00
Chris Beck
aedbddb1ce refactor run_wml_tests script
Make a more normal command builder pipeline, and merge the two
different test functions associated to the -u option.
2014-05-14 22:37:59 -04:00
Chris Beck
8f36bb1d0d fixup run_wml_tests
getopts string wasn't correct, was skipping the -l option.
2014-05-14 21:47:01 -04:00
Chris Beck
3cc25fdb57 wml test script defaults to "--log-strict=warning", -s to disable 2014-05-14 21:42:14 -04:00
Alexander van Gessel
24c9fe0e5e Don't assume the binary somehow ends up in our PATH 2014-05-14 15:59:43 +02:00
Chris Beck
9db311a441 add assertion failure, segfault notes to run_wml_tests 2014-05-13 20:58:52 -04:00
Chris Beck
cd2199cb10 wml test script counts number of passed or failed tests 2014-05-13 20:58:52 -04:00
Chris Beck
090566effd fixup run_wml_tests
Prev version could sometimes give an error if test timed out and
error.log was not created, so add a check for if error.log exists.

Also refactor so the error log handling is in its own function.
2014-05-12 12:05:54 -04:00
Chris Beck
f08db9b3a4 better handling of error logs for wml unit test script
error logs get pooled in errors.log
This is necessary because we don't stop testing when we get an
error anymore.
2014-05-10 18:57:05 -04:00
Chris Beck
8acf5dbe2c wml test script can recieve list of tests as an argument
Also, fixup documentation.
2014-05-10 18:05:50 -04:00
Chris Beck
d560acb9f4 fixup cleanup wml test script
Also only use --validcache conservatively in the -u mode.

Further fixup some comments.

This fixes up commit 5b87baf1e4
2014-05-10 16:37:02 -04:00
Chris Beck
5b87baf1e4 cleanup wml test script
Only start using --validcache with wesnoth after at least one test
has passed.

Use --kill-after flag of unix timeout, so that if TERM fails to
stop wesnoth, a KILL will be issued.

Fixup comments.
2014-05-10 16:30:02 -04:00
Chris Beck
07a1654227 add unix timeout option to wml test script, enable empty_test
Adds an option to the new wml test script, to use the unix
timeout command instead of wesnoth's built-in one. This is because
the built-in one is very slightly unreliable... there's a reason
killthread was deprecated in SDL unfortunately. Will leave it for
UMC but on travis will replace with unix timeout.

The unix timeout one seems consistent enough that I will enable
the empty_test timeout check for travis.

Also, adds a help listing to the wml test script.
2014-05-10 16:06:07 -04:00
Chris Beck
b56b34d2a1 add new wml tests script
Also, redirect some output from cout to cerr in the game...
this somewhat breaks the old script.

The old script is renamed .old

Travis points to the new script.
2014-05-10 14:34:02 -04:00