mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Add Linux Editor tests workflow matrix Add Windows Editor w/ Mono workflow matrix Add Generate Glue Code job to Windows workflow Add Build GodotSharp job to Windows workflow Add godot compatibility version references Add Godot author info Add Godot version compatibility info Add Godot donor info Add Godot authors and donors to editor_about.cpp Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
68 lines
2.4 KiB
Python
Executable File
68 lines
2.4 KiB
Python
Executable File
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import sys
|
|
|
|
if len(sys.argv) < 2:
|
|
print("ERROR: You must run program with file name as argument.")
|
|
sys.exit(50)
|
|
|
|
fname = sys.argv[1]
|
|
|
|
with open(fname.strip(), "r", encoding="utf-8") as fileread:
|
|
file_contents = fileread.read()
|
|
|
|
# If find "ERROR: AddressSanitizer:", then happens invalid read or write
|
|
# This is critical bug, so we need to fix this as fast as possible
|
|
|
|
if file_contents.find("ERROR: AddressSanitizer:") != -1:
|
|
print("FATAL ERROR: An incorrectly used memory was found.")
|
|
sys.exit(51)
|
|
|
|
# There is also possible, that program crashed with or without backtrace.
|
|
|
|
if (
|
|
file_contents.find("Program crashed with signal") != -1
|
|
or file_contents.find("Dumping the backtrace") != -1
|
|
or file_contents.find("Segmentation fault (core dumped)") != -1
|
|
or file_contents.find("Aborted (core dumped)") != -1
|
|
or file_contents.find("terminate called without an active exception") != -1
|
|
):
|
|
print("FATAL ERROR: Redot has been crashed.")
|
|
sys.exit(52)
|
|
|
|
# Finding memory leaks in Redot is quite difficult, because we need to take into
|
|
# account leaks also in external libraries. They are usually provided without
|
|
# debugging symbols, so the leak report from it usually has only 2/3 lines,
|
|
# so searching for 5 element - "#4 0x" - should correctly detect the vast
|
|
# majority of memory leaks
|
|
|
|
if file_contents.find("ERROR: LeakSanitizer:") != -1:
|
|
if file_contents.find("#4 0x") != -1:
|
|
print("ERROR: Memory leak was found")
|
|
sys.exit(53)
|
|
|
|
# It may happen that Redot detects leaking nodes/resources and removes them, so
|
|
# this possibility should also be handled as a potential error, even if
|
|
# LeakSanitizer doesn't report anything
|
|
|
|
if file_contents.find("ObjectDB instances leaked at exit") != -1:
|
|
print("ERROR: Memory leak was found")
|
|
sys.exit(54)
|
|
|
|
# In test project may be put several assert functions which will control if
|
|
# project is executed with right parameters etc. which normally will not stop
|
|
# execution of project
|
|
|
|
if file_contents.find("Assertion failed") != -1:
|
|
print("ERROR: Assertion failed in project, check execution log for more info")
|
|
sys.exit(55)
|
|
|
|
# For now Redot leaks a lot of rendering stuff so for now we just show info
|
|
# about it and this needs to be re-enabled after fixing this memory leaks.
|
|
|
|
if file_contents.find("were leaked") != -1 or file_contents.find("were never freed") != -1:
|
|
print("WARNING: Memory leak was found")
|
|
|
|
sys.exit(0)
|