Proof of concept for a hot-reload test case #1867
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is really rough atm, its late and I just wanted to get what I had up in case its a completely wrong direction to take.
I've been trying to figure out how to test hot reloading in a headless way for CI, and after much headscratching this is what i have so far. I did initally try to incorporate it into the existing tests, but couldnt quite manage that.
I i've filtered the results of the output to clear up some editor things.
I have an arbitrary wait on initial load before i trigger the reload, and I havent been able to deduce a reliable trigger.
Process:
GDEXtension first load:
Editor Load
GDExtension second load:
checks for the lock file. and waits.
the Example class in the running editor receives the GDEXTENSION_RELOADED notification and fires its custom signal
the reload.gd script catches and quits with 0
if the timeout is reached exits 1
Output: