mirror of
https://github.com/Relintai/regression-test-project.git
synced 2024-11-12 10:25:30 +01:00
Add CI to 3.2 (#3)
This commit is contained in:
parent
9c4164cad6
commit
696f3d3d3d
76
.github/workflows/linux_builds.yml
vendored
Normal file
76
.github/workflows/linux_builds.yml
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
name: 🐧 Linux Builds
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
linux-sanitizer:
|
||||
runs-on: "ubuntu-20.04"
|
||||
name: Editor and exported project with sanitizers (target=debug/release, tools=yes/no, debug_symbols=yes/full, use_ubsan=yes, use_asan=yes)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Install all packages (except scons)
|
||||
- name: Configure dependencies
|
||||
run: |
|
||||
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
|
||||
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm \
|
||||
xvfb wget2 unzip python scons git
|
||||
|
||||
# - name: Download Godot
|
||||
# run: |
|
||||
# wget2 https://downloads.tuxfamily.org/godotengine/3.2.4/beta1/Godot_v3.2.4-beta1_x11.64.zip
|
||||
# unzip Godot_v3.2.4-beta1_x11.64.zip
|
||||
# rm Godot_v3.2.4-beta1_x11.64.zip
|
||||
# mv Godot_v3.2.4-beta1_x11.64 godot.x11.tools.64s
|
||||
# wget2 https://downloads.tuxfamily.org/godotengine/3.2.4/beta1/Godot_v3.2.4-beta1_export_templates.tpz
|
||||
# unzip Godot_v3.2.4-beta1_export_templates.tpz
|
||||
# mv templates/linux_x11_64_debug godot.x11.opt.64s
|
||||
# rm -rf templates
|
||||
# rm Godot_v3.2.4-beta1_export_templates.tpz
|
||||
# ls -alr
|
||||
|
||||
# - name: Download Godot(ZIP)
|
||||
# run: |
|
||||
# wget2 https://github.com/godotengine/godot/archive/3.2.zip
|
||||
# unzip 3.2.zip
|
||||
# rm 3.2.zip
|
||||
|
||||
|
||||
- name: Download Godot(GIT)
|
||||
run: |
|
||||
git clone https://github.com/godotengine/godot.git
|
||||
cd godot
|
||||
git checkout 3.2
|
||||
cd ../
|
||||
|
||||
- name: Compile Godot
|
||||
run: |
|
||||
cd godot
|
||||
scons p=x11 -j2 use_asan=yes use_ubsan=yes CCFLAGS="-fsanitize=shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr"
|
||||
scons tools=no target=release debug_symbols=full use_asan=yes use_ubsan=yes CCFLAGS="-fsanitize=shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr"
|
||||
cp bin/godot.x11.tools.64s ../
|
||||
cp bin/godot.x11.opt.64s ../
|
||||
cd ../
|
||||
rm -rf godot
|
||||
|
||||
- name: Use Godot
|
||||
run: |
|
||||
echo "-------------------- OPEN EDITOR TO IMPORT PROJECT -----------------------"
|
||||
DRI_PRIME=0 timeout 25s xvfb-run ./godot.x11.tools.64s -e --path $(pwd) 2>&1 | tee sanitizers_log.txt || true
|
||||
misc/check_ci_log.py sanitizers_log.txt
|
||||
echo "-------------------- OPEN EDITOR SECOND TIME TO BE SURE THAT EVERYTHING WAS IMPORTED -----------------------"
|
||||
DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s -e -q --path $(pwd) 2>&1 | tee sanitizers_log.txt || true
|
||||
misc/check_ci_log.py sanitizers_log.txt
|
||||
echo "-------------------- RUN PROJECT -----------------------"
|
||||
DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s 60 --video-driver GLES3 --path $(pwd) 2>&1 | tee sanitizers_log.txt || true
|
||||
misc/check_ci_log.py sanitizers_log.txt
|
||||
|
||||
# Export project and run it to check for possible leaks and invalid memory usage
|
||||
- name: Exporting and running project
|
||||
run: |
|
||||
curr="$(pwd)/godot.x11.opt.64s"
|
||||
sed -i "s|PATH_TO_CHANGE|$curr|" export_presets.cfg
|
||||
DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s --export-debug "Linux/X11" test_project 2>&1 | tee sanitizers_log.txt || true
|
||||
misc/check_ci_log.py sanitizers_log.txt
|
||||
DRI_PRIME=0 xvfb-run ./test_project 20 2>&1 | tee sanitizers_log.txt || true
|
||||
misc/check_ci_log.py sanitizers_log.txt
|
17
All.tscn
17
All.tscn
@ -1,9 +1,11 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://Control.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Spatial.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://Node2D.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://Other.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://MainScenes/Control.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://MainScenes/Spatial.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://MainScenes/Node2D.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://MainScenes/Other.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://MainScenes/Operators.gd" type="Script" id=5]
|
||||
[ext_resource path="res://Physics/2D/Physics2D.tscn" type="PackedScene" id=6]
|
||||
|
||||
[node name="All" type="Node"]
|
||||
|
||||
@ -14,3 +16,8 @@
|
||||
[node name="Node" parent="." instance=ExtResource( 4 )]
|
||||
|
||||
[node name="Spatial" parent="." instance=ExtResource( 2 )]
|
||||
|
||||
[node name="Operators" type="Node2D" parent="."]
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="Physics2D" parent="." instance=ExtResource( 6 )]
|
||||
|
@ -1,10 +1,12 @@
|
||||
extends Node
|
||||
|
||||
const screen_size = Vector2(1024,600)
|
||||
|
||||
const RANGE : int = 5
|
||||
|
||||
var time_to_show : float = -1000.0
|
||||
|
||||
func _init() -> void:
|
||||
func _init():
|
||||
for argument in OS.get_cmdline_args():
|
||||
var rr : String = argument
|
||||
if rr.find("tscn") != -1: # Ignore all tscn scenes/names
|
@ -1,6 +1,8 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://GridContainer.gd" type="Script" id=1]
|
||||
[ext_resource path="res://MainScenes/Control.gd" type="Script" id=1]
|
||||
|
||||
|
||||
|
||||
[node name="GridContainer" type="GridContainer"]
|
||||
anchor_right = 1.0
|
@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Node2D.gd" type="Script" id=1]
|
||||
[ext_resource path="res://MainScenes/Node2D.gd" type="Script" id=1]
|
||||
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
180
MainScenes/Operators.gd
Normal file
180
MainScenes/Operators.gd
Normal file
@ -0,0 +1,180 @@
|
||||
extends Node2D
|
||||
|
||||
class_name Operators
|
||||
|
||||
signal roman
|
||||
|
||||
onready var sew : int = 0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
|
||||
assert(2>1)
|
||||
|
||||
var arr : Array = [25,235236,236,236,23,6,236,236,236,23,634,63,7,35,4734,64,64,34,62,72,32,535]
|
||||
var dict : Dictionary = {35:535,5236:535,35236:"35","safasf":"w","etwet":"qwrqrqwrqwrq","t":"wet"}
|
||||
var number = 5242434
|
||||
var strin = "asfqwfasfasf"
|
||||
|
||||
52 % -25
|
||||
arr.append(254)
|
||||
arr[36235 % arr.size()]
|
||||
arr[-36235 % arr.size()]
|
||||
if dict.has(strin):
|
||||
dict[strin]
|
||||
sew = sew
|
||||
number is Node2D
|
||||
~36235
|
||||
-36235
|
||||
36235 * 36235
|
||||
36235 / (21)
|
||||
36235 % (21)
|
||||
36235 + 36235
|
||||
36235 - 36235
|
||||
36235 >> int(max(min(36235,0),63))
|
||||
36235 << int(max(min(36235,0),63))
|
||||
36235 & 36235
|
||||
36235 ^ 36235
|
||||
36235 | 36235
|
||||
36235 < 36235
|
||||
36235 > 36235
|
||||
36235 == 36235
|
||||
36235 != 36235
|
||||
36235 >= 36235
|
||||
36235 <= 36235
|
||||
36235 in ["asfasfqw","asfqwgqani"]
|
||||
!36235
|
||||
not 36235
|
||||
36235 and 36235
|
||||
36235 && 36235
|
||||
36235 or 36235
|
||||
36235 || 36235
|
||||
|
||||
number = 36235
|
||||
number += 36235
|
||||
number -= 36235
|
||||
number *= 36235
|
||||
number /= 21
|
||||
number %= 21
|
||||
number &= 36235
|
||||
number |= 36235
|
||||
|
||||
1234567890
|
||||
0x0123456789ABCDEF
|
||||
0x123456789ABCDEF
|
||||
0b101010101010101010101
|
||||
0b010101010101010101010
|
||||
3.242
|
||||
25.1e-125
|
||||
125e+24
|
||||
"2122222222222222222222222222222225125125125215s"
|
||||
"Chrabąszcz"
|
||||
"""
|
||||
MULTILINIONOWOŚĆ
|
||||
"""
|
||||
$"."
|
||||
|
||||
#Comment
|
||||
|
||||
var _r2 = qq()
|
||||
var _rr = qqr("WRT")
|
||||
call("qqr","QWT")
|
||||
var func_ref = funcref(self,"qqr")
|
||||
func_ref.call_func("QWQW")
|
||||
|
||||
if 36235:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
|
||||
var rr : int = 10
|
||||
while(rr != 0):
|
||||
rr -= 1
|
||||
|
||||
match 36235:
|
||||
2:
|
||||
36235
|
||||
5:
|
||||
pass
|
||||
36235
|
||||
3:
|
||||
continue
|
||||
false
|
||||
_:
|
||||
[521252,"asfasfw", "asfw"]
|
||||
|
||||
match typeof(36235):
|
||||
TYPE_AABB:
|
||||
36235
|
||||
TYPE_INT:
|
||||
36235
|
||||
|
||||
match 36235:
|
||||
2:
|
||||
36235
|
||||
# var RR:
|
||||
# RR = 36235
|
||||
|
||||
match randi() % 26:
|
||||
2:
|
||||
pass
|
||||
# var TT:
|
||||
# var ss = TT # BUG GH#34384
|
||||
|
||||
for _i in [5,2,5]:
|
||||
pass
|
||||
for _i in {"a":0}:
|
||||
pass
|
||||
for _i in range(3):
|
||||
pass
|
||||
for _i in range(1,2):
|
||||
pass
|
||||
for _i in range(1,1,3):
|
||||
pass
|
||||
for _i in "Roman":
|
||||
pass
|
||||
for _i in 3:
|
||||
pass
|
||||
for _i in 2.2:
|
||||
pass
|
||||
|
||||
|
||||
enum {TILE, MILE}
|
||||
enum State {STATE_IDLE, STATE_JUMP = 5, STATE_SHOOT}
|
||||
const Roman = {IDLE = 0, JUMP = 5, SHOOT = 6}
|
||||
const TITLE = 0
|
||||
const TITLE2 : int = 0
|
||||
var describtion
|
||||
|
||||
|
||||
func qq():
|
||||
return
|
||||
|
||||
func qqr(_stat : String = "TQW") -> String:
|
||||
return "FAASFW"
|
||||
|
||||
static func ff(_rr : String = "FA") -> String:
|
||||
return "qtqwtwey"
|
||||
|
||||
class ram:
|
||||
var sa : int = 0
|
||||
var qq
|
||||
static func rr() -> ram:
|
||||
return ram.new()
|
||||
static func Wr() -> Node:
|
||||
return Node.new()
|
||||
static func rqq() -> String:
|
||||
return "as"
|
||||
func roman() -> String:
|
||||
return "wqr"
|
||||
func wykop() -> String:
|
||||
return "wqr"
|
||||
|
||||
func func_ready() -> void:
|
||||
var rr : ram = ram.new()
|
||||
rr.sa = 125
|
||||
rr.qq = "qw"
|
||||
var _s = rr.rr()
|
||||
var _r = rr.rqq()
|
||||
var _t = rr.roman()
|
||||
var _y = rr.wykop()
|
@ -1,6 +1,8 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Other.gd" type="Script" id=1]
|
||||
[ext_resource path="res://MainScenes/Other.gd" type="Script" id=1]
|
||||
|
||||
|
||||
|
||||
[node name="Node" type="Node"]
|
||||
script = ExtResource( 1 )
|
@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Spatial.gd" type="Script" id=1]
|
||||
[ext_resource path="res://MainScenes/Spatial.gd" type="Script" id=1]
|
||||
|
||||
|
||||
[node name="Spatial" type="Spatial"]
|
||||
script = ExtResource( 1 )
|
27
Physics/2D/Area2D.gd
Normal file
27
Physics/2D/Area2D.gd
Normal file
@ -0,0 +1,27 @@
|
||||
extends Node2D
|
||||
|
||||
var move_vector : Vector2 = Vector2(1,1)
|
||||
var speed : float = 1000.0
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
func _process(delta):
|
||||
position += Vector2(move_vector.x * delta * speed,move_vector.y * delta * speed)
|
||||
|
||||
if position.y > Autoload.screen_size.y:
|
||||
move_vector.y = -1
|
||||
elif position.y < 0:
|
||||
move_vector.y = 1
|
||||
elif position.x > Autoload.screen_size.x:
|
||||
move_vector.x = -1
|
||||
elif position.x < 0:
|
||||
move_vector.x = 1
|
||||
|
||||
|
||||
func _on_Area2D_area_entered(area):
|
||||
move_vector = -move_vector
|
||||
|
||||
|
||||
func _on_Area2D_body_entered(body):
|
||||
move_vector = Vector2(move_vector.x,-move_vector.y)
|
16
Physics/2D/Area2D.tscn
Normal file
16
Physics/2D/Area2D.tscn
Normal file
@ -0,0 +1,16 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://icon 32x32.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Physics/2D/Area2D.gd" type="Script" id=2]
|
||||
|
||||
[node name="Area2D" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PoolVector2Array( 4.018, -13.1782, -15.9057, 3.23778, 1.63277, 17.5492, 19.3115, 2.39594 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_Area2D_area_entered"]
|
||||
[connection signal="body_entered" from="." to="." method="_on_Area2D_body_entered"]
|
19
Physics/2D/KinematicBody2D.gd
Normal file
19
Physics/2D/KinematicBody2D.gd
Normal file
@ -0,0 +1,19 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
var move_vector : Vector2 = Vector2(1,1)
|
||||
var speed : float = 1000.0
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
func _process(delta):
|
||||
position += Vector2(move_vector.x * delta * speed,move_vector.y * delta * speed)
|
||||
|
||||
if position.y > Autoload.screen_size.y:
|
||||
move_vector.y = -1
|
||||
elif position.y < 0:
|
||||
move_vector.y = 1
|
||||
elif position.x > Autoload.screen_size.x:
|
||||
move_vector.x = -1
|
||||
elif position.x < 0:
|
||||
move_vector.x = 1
|
15
Physics/2D/KinematicBody2D.tscn
Normal file
15
Physics/2D/KinematicBody2D.tscn
Normal file
@ -0,0 +1,15 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://icon 32x32.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Physics/2D/KinematicBody2D.gd" type="Script" id=2]
|
||||
|
||||
[node name="KinematicBody2D" type="KinematicBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
modulate = Color( 0.74902, 0.133333, 0.133333, 1 )
|
||||
rotation = 4.45932
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PoolVector2Array( -10.6781, -7.48182, -12.4953, 17.1263, 15.2543, 6.19464, 4.32263, -14.4073 )
|
1
Physics/2D/Physics2D.gd
Normal file
1
Physics/2D/Physics2D.gd
Normal file
@ -0,0 +1 @@
|
||||
extends Node2D
|
120
Physics/2D/Physics2D.tscn
Normal file
120
Physics/2D/Physics2D.tscn
Normal file
@ -0,0 +1,120 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://Physics/2D/Physics2D.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Physics/2D/Area2D.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://Physics/2D/KinematicBody2D.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://Physics/2D/StaticBody2D.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://Physics/2D/RigidBody2D.tscn" type="PackedScene" id=5]
|
||||
|
||||
[node name="Physics2D" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Area2D" type="Node2D" parent="."]
|
||||
|
||||
[node name="Area2D" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 166.677, 52.3842 )
|
||||
|
||||
[node name="Area2D2" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 209.537, 193.663 )
|
||||
|
||||
[node name="Area2D3" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 450.822, 122.23 )
|
||||
|
||||
[node name="Area2D4" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 336.529, 293.669 )
|
||||
|
||||
[node name="Area2D5" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 555.59, 42.8598 )
|
||||
|
||||
[node name="Area2D6" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 598.45, 184.139 )
|
||||
|
||||
[node name="Area2D7" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 839.735, 112.705 )
|
||||
|
||||
[node name="Area2D8" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 725.442, 284.145 )
|
||||
|
||||
[node name="Area2D10" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 420.661, 330.179 )
|
||||
|
||||
[node name="Area2D12" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 547.653, 430.186 )
|
||||
|
||||
[node name="Area2D14" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 122.23, 457.171 )
|
||||
|
||||
[node name="Area2D16" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 249.222, 557.178 )
|
||||
|
||||
[node name="Area2D18" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 660.359, 444.472 )
|
||||
|
||||
[node name="Area2D19" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 901.644, 373.039 )
|
||||
|
||||
[node name="Area2D20" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 787.351, 544.478 )
|
||||
|
||||
[node name="KinematicBody2D" type="Node2D" parent="."]
|
||||
|
||||
[node name="KinematicBody2D" parent="KinematicBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 90.4819, 302.4 )
|
||||
|
||||
[node name="KinematicBody2D2" parent="KinematicBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 380.142, 465.25 )
|
||||
|
||||
[node name="KinematicBody2D3" parent="KinematicBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 333.423, 131.54 )
|
||||
|
||||
[node name="KinematicBody2D4" parent="KinematicBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 509.622, 242.332 )
|
||||
|
||||
[node name="KinematicBody2D5" parent="KinematicBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 914.078, 76.812 )
|
||||
|
||||
[node name="StaticBody2D" type="Node2D" parent="."]
|
||||
position = Vector2( 73.6327, 117.071 )
|
||||
|
||||
[node name="StaticBody2D" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
|
||||
[node name="StaticBody2D2" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
position = Vector2( 171.12, 267.286 )
|
||||
|
||||
[node name="StaticBody2D3" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
position = Vector2( 618.011, -2.82837 )
|
||||
|
||||
[node name="StaticBody2D4" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
position = Vector2( 793.374, 120.208 )
|
||||
|
||||
[node name="StaticBody2D5" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
position = Vector2( 704.278, 296.985 )
|
||||
|
||||
[node name="RigidBody2D" type="Node2D" parent="."]
|
||||
|
||||
[node name="RigidBody2D" parent="RigidBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 178.191, 120.915 )
|
||||
|
||||
[node name="RigidBody2D2" parent="RigidBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 192.874, 313.132 )
|
||||
|
||||
[node name="RigidBody2D3" parent="RigidBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 386.426, 210.35 )
|
||||
|
||||
[node name="RigidBody2D4" parent="RigidBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 374.412, 43.4946 )
|
||||
|
||||
[node name="RigidBody2D5" parent="RigidBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 609.344, 331.82 )
|
||||
|
||||
[node name="RigidBody2D6" parent="RigidBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 756.177, 187.657 )
|
||||
|
||||
[node name="RigidBody2D7" parent="RigidBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 754.842, 43.4946 )
|
||||
|
||||
[node name="RigidBody2D8" parent="RigidBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 490.543, 544.06 )
|
||||
|
||||
[node name="RigidBody2D9" parent="RigidBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 490.543, 544.06 )
|
20
Physics/2D/RigidBody2D.gd
Normal file
20
Physics/2D/RigidBody2D.gd
Normal file
@ -0,0 +1,20 @@
|
||||
extends RigidBody2D
|
||||
|
||||
var move_vector : Vector2 = Vector2(1,1)
|
||||
var speed : float = 1000.0
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
func _process(delta):
|
||||
#position += Vector2(move_vector.x * delta * speed,move_vector.y * delta * speed)
|
||||
|
||||
if position.y > Autoload.screen_size.y:
|
||||
move_vector.y = -1
|
||||
elif position.y < 0:
|
||||
move_vector.y = 1
|
||||
elif position.x > Autoload.screen_size.x:
|
||||
move_vector.x = -1
|
||||
elif position.x < 0:
|
||||
move_vector.x = 1
|
||||
apply_impulse(move_vector,Vector2(0,1))
|
16
Physics/2D/RigidBody2D.tscn
Normal file
16
Physics/2D/RigidBody2D.tscn
Normal file
@ -0,0 +1,16 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Physics/2D/RigidBody2D.gd" type="Script" id=1]
|
||||
[ext_resource path="res://icon 32x32.png" type="Texture" id=2]
|
||||
|
||||
[node name="RigidBody2D" type="RigidBody2D"]
|
||||
gravity_scale = 0.1
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PoolVector2Array( -2.29324, -15.2017, -12.0322, 4.46353, 8.38219, 7.64743 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
modulate = Color( 0.47451, 0, 0.427451, 1 )
|
||||
rotation = 0.792379
|
||||
texture = ExtResource( 2 )
|
19
Physics/2D/StaticBody2D.gd
Normal file
19
Physics/2D/StaticBody2D.gd
Normal file
@ -0,0 +1,19 @@
|
||||
extends StaticBody2D
|
||||
|
||||
var move_vector : Vector2 = Vector2(1,1)
|
||||
var speed : float = 1000.0
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
func _process(delta):
|
||||
position += Vector2(move_vector.x * delta * speed,move_vector.y * delta * speed)
|
||||
|
||||
if position.y > Autoload.screen_size.y:
|
||||
move_vector.y = -1
|
||||
elif position.y < 0:
|
||||
move_vector.y = 1
|
||||
elif position.x > Autoload.screen_size.x:
|
||||
move_vector.x = -1
|
||||
elif position.x < 0:
|
||||
move_vector.x = 1
|
15
Physics/2D/StaticBody2D.tscn
Normal file
15
Physics/2D/StaticBody2D.tscn
Normal file
@ -0,0 +1,15 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://icon 32x32.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Physics/2D/StaticBody2D.gd" type="Script" id=2]
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PoolVector2Array( -0.566719, -5.64549, -7.24092, 1.19557, -2.06841, 8.20348, 5.60692, 5.20009, 4.10522, -5.14492 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
modulate = Color( 0, 1, 1, 0.584314 )
|
||||
rotation = 0.270526
|
||||
texture = ExtResource( 1 )
|
19
README.md
19
README.md
@ -1,7 +1,18 @@
|
||||
This repository contains Godot project, to test regression with engine.
|
||||
## Godot regression test project
|
||||
This repository contains Godot project which is tested in offical Godot repository(3.2 branch)
|
||||
|
||||
It creates and add to scene every single node.
|
||||
It aims to be complex project, which will allow to find crashes, leaks and invalid memory writes before PR is merged.
|
||||
|
||||
For now it use only nodes with default parameters(they are add instantly after creating - add_node(Sprite.new())), but it should add as much parameters as possible.
|
||||
Sadly it can't find any logic errors.
|
||||
|
||||
Project shouldn't use too much randomize functions, because reproducing bugs would be a madness.
|
||||
For now it is really simple, but some I think that it can be improved over time.
|
||||
|
||||
## Contributions
|
||||
Contributions are welcome.
|
||||
|
||||
For now there is no requirements to format code.
|
||||
|
||||
New functionalities(e.g. physics checks) should be done in different folders(cleaner view to resources)
|
||||
|
||||
## Epilepsy Warning
|
||||
Due using by project a lot of functions from each type of Node, screen may flicker, images and objects may change randomly color and size which may lead some users to health problems.
|
||||
|
BIN
icon 32x32.png
Normal file
BIN
icon 32x32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
34
icon 32x32.png.import
Normal file
34
icon 32x32.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon 32x32.png-b86539832226708d9735f29f6872d9e2.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon 32x32.png"
|
||||
dest_files=[ "res://.import/icon 32x32.png-b86539832226708d9735f29f6872d9e2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
34
icon.png.import
Normal file
34
icon.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
51
misc/check_ci_log.py
Executable file
51
misc/check_ci_log.py
Executable file
@ -0,0 +1,51 @@
|
||||
#!/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(1)
|
||||
|
||||
fname = sys.argv[1]
|
||||
|
||||
fileread = open(fname.strip(), "r")
|
||||
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(1)
|
||||
|
||||
# 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
|
||||
):
|
||||
print("FATAL ERROR: Godot has been crashed.")
|
||||
sys.exit(1)
|
||||
|
||||
# Finding memory leaks in Godot 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(1)
|
||||
|
||||
# It may happen that Godot 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(1)
|
||||
|
||||
sys.exit(0)
|
@ -8,23 +8,41 @@
|
||||
|
||||
config_version=4
|
||||
|
||||
_global_script_classes=[ ]
|
||||
_global_script_classes=[ {
|
||||
"base": "Node2D",
|
||||
"class": "Operators",
|
||||
"language": "GDScript",
|
||||
"path": "res://MainScenes/Operators.gd"
|
||||
} ]
|
||||
_global_script_class_icons={
|
||||
|
||||
"Operators": ""
|
||||
}
|
||||
|
||||
[application]
|
||||
|
||||
run/main_scene="res://All.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[autoload]
|
||||
|
||||
Autoload="*res://Autoload.gd"
|
||||
Autoload="*res://Autoload/Autoload.gd"
|
||||
|
||||
[debug]
|
||||
|
||||
gdscript/warnings/enable=false
|
||||
gdscript/warnings/standalone_expression=false
|
||||
|
||||
[memory]
|
||||
|
||||
limits/message_queue/max_size_kb=131072
|
||||
|
||||
[network]
|
||||
|
||||
limits/debugger_stdout/max_chars_per_second=16384
|
||||
limits/debugger_stdout/max_messages_per_frame=100
|
||||
limits/debugger_stdout/max_errors_per_second=1000
|
||||
limits/debugger_stdout/max_warnings_per_second=1000
|
||||
|
||||
[rendering]
|
||||
|
||||
environment/default_environment="res://Environment.tres"
|
||||
|
Loading…
Reference in New Issue
Block a user