[wesnoth-commits] [wesnoth/wesnoth] fa7201: run_wml_tests: Print the correct test name when a ...

Steve Cotton noreply at github.com
Mon Apr 19 05:41:15 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: fa720141587392938ce65fcaae1827b467bc397c
      https://github.com/wesnoth/wesnoth/commit/fa720141587392938ce65fcaae1827b467bc397c
  Author: Steve Cotton <steve at octalot.co.uk>
  Date:   2021-04-19 (Mon, 19 Apr 2021)

  Changed paths:
    M run_wml_tests

  Log Message:
  -----------
  run_wml_tests: Print the correct test name when a test fails

The fix in 9535ed9 didn't work, the script still crashed on that line, the
logic for working out how many tests in the batch had passed wasn't correct.
This commit drops that logic, and drops the dependent feature of trying to
retry the next test in the batch, and simply says the entire batch failed.

The new logic for filtering the output of a failed batch is much simpler - the
script doesn't filter it and we assume the developer is just going to ignore
any line that starts "PASS TEST". Only tests that are expected to pass get
batched, so the output is going to look something like the following:

	PASS TEST: test_return
	PASS TEST: test_assert
	PASS TEST: test_return_2
	PASS TEST: test_assert_2
	Assertion failed: assert false
	FAIL TEST: test_assert_fail

	Failure, Wesnoth returned 1 FAIL but we expected 0 PASS

A set of constants is added defining how many -v arguments are needed to
enable a given set of debugging output. Expectation is that level 0 is normal,
and level 1 is for developers who like long-running build processes to print
something to show that they're not stuck.





More information about the Commits mailing list