Merge lp:~widelands-dev/widelands/bug-1786597-test-suite into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 8781
Proposed branch: lp:~widelands-dev/widelands/bug-1786597-test-suite
Merge into: lp:widelands
Diff against target: 22 lines (+0/-2)
1 file modified
src/logic/map_objects/tribes/carrier.cc (+0/-2)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bug-1786597-test-suite
Reviewer Review Type Date Requested Status
ypopezios Approve
Review via email: mp+352928@code.launchpad.net

Commit message

Fix the testsuite for carriers

Description of the change

This should unbreak the test suite

To post a comment you must log in.
Revision history for this message
ypopezios (ypopezios) wrote :

Inline comment.
Also, if you haven't done it, check this comment:
https://bugs.launchpad.net/widelands/+bug/1535115/comments/33

Revision history for this message
GunChleoc (gunchleoc) wrote :

Oops... fixed!

If this code sufficient or will it barf it the carrier is in init rather than wait? I don't care much about 100% correctness for the saveloading at this point.

I am working on a follow-up branch and use an enum class for the states. Working on that has flagged up lots of hard-coded and fragile stuff from old code.

Revision history for this message
ypopezios (ypopezios) wrote :

In current problematic design, a carrier in an invalid state can easily get stuck, so we will need to test some actual savegames to answer that.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3770. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/414860025.
Appveyor build 3569. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1786597_test_suite-3569.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I tried to add https://bugs.launchpad.net/widelands/+bug/1535115/comments/33 into the compatibility code but it broke the test suite again, so I used the branch to update the mapobjectpacket in the problematic test scenario and removed the savegame compatibility.

Revision history for this message
ypopezios (ypopezios) wrote :

Does this end this branch' reason of existence?

review: Needs Information
Revision history for this message
GunChleoc (gunchleoc) wrote :

No, it will fix the test suite. See the changes to the binary file on he bottom ;)

Revision history for this message
ypopezios (ypopezios) wrote :

As far as it concerns me, this looks ok ;-P

review: Approve
Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for the review! :)

@bunnybot merge

Revision history for this message
GunChleoc (gunchleoc) wrote :

Transient error on Travis

@bunnybot merge force

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3780. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/415308939.
Appveyor build 3579. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1786597_test_suite-3579.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Refusing to merge, since Travis is not green. Use @bunnybot merge force for merging anyways.

Travis build 3780. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/415308939.

Revision history for this message
GunChleoc (gunchleoc) wrote :

@bunnybot merge force

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/logic/map_objects/tribes/carrier.cc'
2--- src/logic/map_objects/tribes/carrier.cc 2018-08-09 11:11:15 +0000
3+++ src/logic/map_objects/tribes/carrier.cc 2018-08-13 05:51:48 +0000
4@@ -421,7 +421,6 @@
5
6 ==============================
7 */
8-
9 constexpr uint8_t kCurrentPacketVersion = 2;
10
11 Carrier::Loader::Loader() {
12@@ -431,7 +430,6 @@
13 Worker::Loader::load(fr);
14
15 try {
16-
17 uint8_t packet_version = fr.unsigned_8();
18 if (packet_version == kCurrentPacketVersion) {
19 Carrier& carrier = get<Carrier>();
20
21=== modified file 'test/maps/lua_testsuite.wmf/binary/mapobjects'
22Binary files test/maps/lua_testsuite.wmf/binary/mapobjects 2018-07-13 10:35:16 +0000 and test/maps/lua_testsuite.wmf/binary/mapobjects 2018-08-13 05:51:48 +0000 differ

Subscribers

People subscribed via source and target branches

to status/vote changes: