The first commit is broken because a playerID is different from a playerEntityID.
The second one because it didn't update the tests.
Details
- Reviewers
bb Itms - Commits
- rP20527: Fix Builder test following rP20521, refs #4870.
run the tests, notice that the same stuff is covered
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Successful build - Chance fights ever on the side of the prudent.
Updating workspaces... Build (release)... Build (debug)... Running release tests... Running cxxtest tests (308 tests). In TestComponentScripts::test_scripts: ../../../source/test_setup.cpp:134: Error: Test failed: Stack trace: @simulation/components/tests/test_Builder.js:19:1 Expected equal, got ["structures/{civ}_barracks", "structures/{civ}_civil_centre"] !== [] ../../../source/test_setup.cpp:134: Error: Test failed: Stack trace: @simulation/components/tests/test_Builder.js:35:1 Expected equal, got ["structures/{civ}_barracks", "structures/{civ}_civil_centre"] !== ["structures/iber_barracks", "structures/iber_civil_centre"] ../../../source/test_setup.cpp:134: Error: Test failed: Stack trace: @simulation/components/tests/test_Builder.js:41:1 Expected equal, got [] !== ["structures/iber_civil_centre"] ../../../source/test_setup.cpp:134: Error: Test failed: Stack trace: @simulation/components/tests/test_Builder.js:53:1 Expected equal, got ["structures/{civ}_barracks", "structures/{civ}_civil_centre"] !== ["structures/iber_barracks", "structures/iber_civil_centre"] ../../../source/test_setup.cpp:134: Error: Test failed: Stack trace: @simulation/components/tests/test_Builder.js:61:1 Expected equal, got ["structures/{civ}_barracks", "structures/{civ}_civil_centre"] !== ["structures/iber_civil_centre"] .................................................................................................................................................................................................................................................................................................................. Failed 1 and Skipped 0 of 308 tests Success rate: 99% Running debug tests... Running cxxtest tests (308 tests). In TestComponentScripts::test_scripts: ../../../source/test_setup.cpp:134: Error: Test failed: Stack trace: @simulation/components/tests/test_Builder.js:19:1 Expected equal, got ["structures/{civ}_barracks", "structures/{civ}_civil_centre"] !== [] ../../../source/test_setup.cpp:134: Error: Test failed: Stack trace: @simulation/components/tests/test_Builder.js:35:1 Expected equal, got ["structures/{civ}_barracks", "structures/{civ}_civil_centre"] !== ["structures/iber_barracks", "structures/iber_civil_centre"] ../../../source/test_setup.cpp:134: Error: Test failed: Stack trace: @simulation/components/tests/test_Builder.js:41:1 Expected equal, got [] !== ["structures/iber_civil_centre"] ../../../source/test_setup.cpp:134: Error: Test failed: Stack trace: @simulation/components/tests/test_Builder.js:53:1 Expected equal, got ["structures/{civ}_barracks", "structures/{civ}_civil_centre"] !== ["structures/iber_barracks", "structures/iber_civil_centre"] ../../../source/test_setup.cpp:134: Error: Test failed: Stack trace: @simulation/components/tests/test_Builder.js:61:1 Expected equal, got ["structures/{civ}_barracks", "structures/{civ}_civil_centre"] !== ["structures/iber_civil_centre"] .................................................................................................................................................................................................................................................................................................................. Failed 1 and Skipped 0 of 308 tests Success rate: 99% Checking XML files...
Some orders can be done when committing.
hmmm vulcan still yells @Itms ?
binaries/data/mods/public/simulation/components/tests/test_Builder.js | ||
---|---|---|
19 ↗ | (On Diff #4376) | not the same stuff exactly, but all the current correct indeed |
48–58 ↗ | (On Diff #4376) | the order here should be consistent with the first mock (as the first has the order defined in player.js) |
As I can't build the test executable I'm gonna pass for this one. What I read looks good at first sight. The introduction of that variable is good and nice catch for those unnecessary parentheses.
Yes, this is because Vulcan tests patches on top of the last successfully built commit. In our case this is rP20520. Applying the patch here creates tests that do not match the changes added in rP20521.
The situation is not supposed to happen since D1065 didn't pass the tests, and I need to figure out why Jenkins didn't mark the build as failed for that differential.
Green light for committing this fix, thanks for looking into it!
Thanks for the reviews and comments.
binaries/data/mods/public/simulation/components/tests/test_Builder.js | ||
---|---|---|
48–58 ↗ | (On Diff #4376) | Fixed. Made it alphabetic order everywhere which also minimizes the number of changed lines. |