These errors could previously go undetected, since they were easy to miss at the
end of the output and did not cause run-tests.py to fail.
This change adds a `*` pseudo-entry to test_status.json, which is set to
"failed" if any tests failed *or* failed to load. This avoids the need to change
run-tests.py, which is cached on Buildmaster.
See #1815
- unit_action_fields(): handled primitive union members correctly
- unit_action_type(): added messages to make failures easier to diagnose
- Also removed redundant checks that effectively checked that
`enum.attrs[k] == enum.attrs[v]` - this is out of scope of union tests
- explain modes, done command, and test_config.json file format
- also be more flexible with how the done command is formatted (can now be
passed as either separate tokens or as a single quoted string)
- print the filter values when filtering tests
and add tests. to write test the table_eq function itself, I expose it
in the text env via expect_raw. if we don't want to do this,
alternatives could be:
1. add the test to main.lua itself
2. expose the expect.table_eq function via a test_hooks variable. then
test.lua could require main.lua and access the function via the hook.
may need to update main.lua a bit to ensure it does not run when it
is "require"d
- make test config controllable via commandline params
- enable filtering by mode
- fix test filter code (it would misbehave if multiple filters were
specified)
- allow done_command to have multiple tokens (before it could only be
one word)
- remove preemptive check for the title screen. it is still checked when a
test actually requires that the game is on the title screen
- Now keeps track of the state of each test individually
- Only runs uncompleted tests if DF crashes/restarts
- DF now exits with 0
- Easier to run locally
- Hopefully works on Travis too!
Also modified Core/Console a bit to get this to actually produce output on
Travis (DFHACK_DISABLE_CONSOLE now allows console output, just not input)
Squashed merge from lethosor/tests