Commit graph

21 commits

Author SHA1 Message Date
mattsc
1c88a6d8c8 Do not load helper.lua where it is not used any more
(cherry-picked from commit 4b6681a300)
2018-10-07 03:21:10 +00:00
mattsc
58529e95f8 Lua code: replace deprecated helper.get_child() calls
(cherry-picked from commit f0bb40590f)
2018-10-07 03:21:08 +00:00
Charles Dang
471c9e876a Addressed a large chunk of the whitespace issues from #2613
[ci skip]
2018-03-09 11:37:00 +11:00
Gregory A Lundberg
11d7b9f0cf Fix mp_tests
Don't know why it's not working but I can get it working by not performing the chat message.
2017-11-28 21:15:34 -06:00
Charles Dang
16c0ba2863 Attempt to fix MP tests
Underlying problem should still be fixed, though.
2017-05-05 18:59:56 +11:00
Celtic Minstrel
e0ce22880e MP Tests: Fix disagreement in plugin context name 2016-11-12 21:15:02 -05:00
Celtic Minstrel
05d47216db Remove reference to removed pref from MP tests 2016-11-11 18:20:12 -05:00
Celtic Minstrel
c43651f99b Rename GUI2 MP tests to replace their now-missing GUI1 counterparts 2016-11-11 17:33:25 -05:00
Celtic Minstrel
5c57f25ce7 Remove GUI1 MP tests 2016-11-11 17:33:25 -05:00
Jyrki Vesterinen
cf65a384c1 Update the preference key in GUI1 MP test plugins
Follow-up to c0c87fa9de.
2016-10-12 21:31:53 +03:00
Celtic Minstrel
a8aa38277e Revert accidentally-committed code in c5ce248f54. 2016-09-29 14:40:46 -04:00
Celtic Minstrel
c5ce248f54 Update credits listing
This adds a large number of people gleaned from the logs with:
	git log --merges --since=Jan.1.2015

If any of the people added in this commit wish to change how they
are referenced, they are of course free to contact us.
2016-09-29 11:21:05 -04:00
Jyrki Vesterinen
e1895e8eaa Enable the GUI2 lobby in the GUI2 lobby test 2016-09-25 20:17:47 +03:00
Jyrki Vesterinen
2c4d72f544 Fix multiplayer tests failing in Travis CI
It depends on timing whether or not the guest shows the wait dialog between
scenarios. If the second scenario has already started when the guest tries
to show the dialog, the dialog is skipped: otherwise it's shown and it
changes the plugin context.

The join.lua plugin assumed the change of plugin context to mean that the
test is over and that the plugin should quit the game. As a result, it
ended up quitting in the middle of the test if the second scenario hadn't
started yet.

Commit 6016bdf2 tried to fix the problem by allowing the plugin context to
change once during the test. It resulted in the opposite problem: if the
second scenario *had* started, the plugin context didn't change. When the
test ended and the guest was thrown into the lobby, then the plugin
assumed that it was just the scenario change and kept waiting for the next
scenario that wasn't coming.

This commit finally fixes the problem by explicitly polling the name of the
scenario being played. Now join.lua ignores plugin context changes as long
as the last scenario hasn't started, but starts waiting for the game to end
when the scenario starts.

I verified locally that, with these changes applied, the tests pass both
with an unmodified build and with a build that has an artificial delay to
simulate the timing in Travis.
2016-09-03 17:30:48 +03:00
Jyrki Vesterinen
6016bdf2f2 Fix two bugs causing multiplayer tests to fail
After finding a game, in some circumstances the join script got the
leader select dialog after only yielding once. Because the loop that
checks when the dialog appears was a repeat-until loop and not a while
loop, it was always run at least once, making the script yield even when
the dialog was already shown. That caused the dialog to close with a
"not shown" status that resulted in exiting the game.

MP tests run two games, not one. A MP wait screen is shown between the
games to the joining player (but not to the host, see
src/game_initialization/playcampaign.cpp:352 ). The join script ended up
quitting between the games. Fixed by simply duplicating code to make the
join script play two games.
2016-08-31 23:45:26 +03:00
Jyrki Vesterinen
88ca728080 Skip the GUI2 FLG dialog in the automatic multiplayer test 2016-08-31 23:45:26 +03:00
Celtic Minstrel
20b7e5b757 MP Test: Give up after 100 tries
This allows the test script to terminate even if
something went wrong, such as a server crash.
2016-07-17 17:21:13 -04:00
Chris Beck
7a1e636569 add log function to host, join lua scripts 2014-12-19 19:47:29 -05:00
Chris Beck
60bb254f69 try to make join.lua more robust against missed callbacks 2014-12-19 19:47:25 -05:00
Chris Beck
7e5c599e79 make the titlescreen phase more reliable for host.lua, join.lua 2014-12-19 19:47:25 -05:00
Chris Beck
7aedfad426 add test bots
The test bots are able to host and join a game together on a local
server. This is still experimental, for instance they cannot
actually leave, and the controllers are human because the host
cannot yet configure them to be AI.
2014-12-19 19:47:24 -05:00