-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Fix for tests) Assign valid IDs to NPCs used during testing #72167
(Fix for tests) Assign valid IDs to NPCs used during testing #72167
Conversation
b3c3b6b
to
9300eef
Compare
9300eef
to
125dc0f
Compare
125dc0f
to
4f21f03
Compare
d485718
to
a203241
Compare
a203241
to
557cc3a
Compare
A question/suggestion: Wouldn't draft ensure the PR doesn't get merged prematurely? Is there something about draft mode that causes some important tests not to be performed? |
iirc draft prs do not run all the tests |
Specifically I don't know off-hand which tests the drafts do not run, so just to be sure it's not in draft. Yes I suppose I could check, but slapping a big warning label on it is something I know works, so eh. Keep it simple. |
557cc3a
to
3fd4157
Compare
Assuming the current commit (Assign test NPCs valid IDs) makes it through GCC9 it should be good. |
Kicked failed tests in attempt to get to GC9 Ubuntu |
Ahhhhh the accidental ambiguity, I meant
|
Draft skips all the build matrix except basic build, so it would have been the wrong choice here. |
Summary
None
Purpose of change
https://github.com/CleverRaven/Cataclysm-DDA/actions/runs/8139343413/job/22242297663?pr=72106#step:17:78 looks like this was broken by the morale test I added in #72018
Describe the solution
Change error reporting so we can figure out what mission this is even supposed to be. The integer id is not useful
(After we figure it out) fix the actual cause--> Assign all NPCs, even test NPCs, valid IDs. Then when the test NPC dies and its ID is checked for various things (like failing missions), no unintended interactions happen.Describe alternatives you've considered
Testing
Wait to see if
GCC 9, Curses, LTO
builds and tests pass on itAdditional context
While this resolves a bug with
standard_npc
which prevents the error from occurring, it does not actually address the root cause of the error. The actual error is(~[slow] ~[.],starting_items)=> (continued from above) ERROR : src/avatar.cpp:369 [void avatar::on_mission_finished(mission&)] completed mission MISSION_CAMP_LEADERSHIP_CHANGE was not in the active_missions list
. But the mission should be in the active_missions list. Still, the primary purpose here is to make sure the tests pass, and if we can do that by fixing a bug with test data (standard_npc is used only for tests) then that shall suffice.