mirror of
https://github.com/Relintai/regression-test-project.git
synced 2025-03-12 18:38:50 +01:00
Rebase to current 3.2 branch
This commit is contained in:
parent
a17d7aa9c0
commit
d5bc77446b
@ -2,15 +2,15 @@ extends Node
|
|||||||
|
|
||||||
const screen_size = Vector2(1024, 600)
|
const screen_size = Vector2(1024, 600)
|
||||||
|
|
||||||
const RANGE: int = 10
|
var start_time : int
|
||||||
|
var last_time : int
|
||||||
|
|
||||||
const PRINT_TIME_EVERY_SECONDS : int = 5
|
const PRINT_TIME_EVERY_MILISECONDS : int = 5000
|
||||||
var time_to_print_next_time : int = PRINT_TIME_EVERY_SECONDS
|
var time_to_print_next_time : int = PRINT_TIME_EVERY_MILISECONDS
|
||||||
var current_run_time : float = 0.0
|
|
||||||
|
|
||||||
var time_to_show: float = 20 # How long test works
|
var time_to_show: int = 15 * 1000 # How long test works in miliseconds
|
||||||
|
|
||||||
var time_for_each_step : float = -1.0
|
var time_for_each_step : int = -1
|
||||||
|
|
||||||
# Each scene runs alone
|
# Each scene runs alone
|
||||||
const alone_steps : Array = [
|
const alone_steps : Array = [
|
||||||
@ -22,7 +22,7 @@ const alone_steps : Array = [
|
|||||||
"res://Physics/3D/Physics3D.tscn",
|
"res://Physics/3D/Physics3D.tscn",
|
||||||
"res://Rendering/Lights2D/Lights2D.tscn",
|
"res://Rendering/Lights2D/Lights2D.tscn",
|
||||||
"res://Rendering/Lights3D/Lights3D.tscn",
|
"res://Rendering/Lights3D/Lights3D.tscn",
|
||||||
"res://Text/Text.tscn",
|
"res://Text/Text.tscn"
|
||||||
]
|
]
|
||||||
|
|
||||||
# All scenes run in one step
|
# All scenes run in one step
|
||||||
@ -32,24 +32,27 @@ const all_in_one : Array = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
func _init():
|
func _init():
|
||||||
|
start_time = OS.get_ticks_msec()
|
||||||
|
|
||||||
# In case when user doesn't provide time
|
# In case when user doesn't provide time
|
||||||
time_for_each_step = time_to_show / (alone_steps.size() + 1)
|
time_for_each_step = time_to_show / (alone_steps.size() + 1)
|
||||||
|
|
||||||
for argument in OS.get_cmdline_args():
|
for argument in OS.get_cmdline_args():
|
||||||
var rr: String = argument
|
var rr: String = argument
|
||||||
if rr.find("tscn") != -1: # Ignore all tscn scenes/names
|
if rr.ends_with("tscn"): # Ignore all tscn scenes/names
|
||||||
continue
|
continue
|
||||||
time_to_show = argument.to_float()
|
time_to_show = int(argument.to_float() * 1000)
|
||||||
time_for_each_step = time_to_show / (alone_steps.size() + 1)
|
time_for_each_step = time_to_show / (alone_steps.size() + 1)
|
||||||
print("Time set to: " + str(time_to_show) + " seconds with "+ str(alone_steps.size() + 1) + " steps, each step will take " + str(time_for_each_step) + " seconds.")
|
print("Time set to: " + str(time_to_show / 1000.0) + " seconds with "+ str(alone_steps.size() + 1) + " steps, each step will take " + str(time_for_each_step / 1000.0) + " seconds.")
|
||||||
break
|
|
||||||
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
current_run_time += delta
|
var current_run_time : int = OS.get_ticks_msec() - start_time
|
||||||
|
|
||||||
if current_run_time > time_to_print_next_time:
|
if current_run_time > time_to_print_next_time:
|
||||||
print("Test is running now " + str(time_to_print_next_time) + " seconds")
|
print("Test is running now " + str(int(time_to_print_next_time / 1000)) + " seconds")
|
||||||
time_to_print_next_time += PRINT_TIME_EVERY_SECONDS
|
time_to_print_next_time += PRINT_TIME_EVERY_MILISECONDS
|
||||||
|
|
||||||
if current_run_time > time_to_show:
|
if current_run_time > time_to_show:
|
||||||
|
print("Ending test")
|
||||||
get_tree().quit()
|
get_tree().quit()
|
||||||
|
@ -2,7 +2,7 @@ extends GridContainer
|
|||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
for _i in range(Autoload.RANGE):
|
for _i in range(5):
|
||||||
add_child(Control.new())
|
add_child(Control.new())
|
||||||
add_child(Popup.new())
|
add_child(Popup.new())
|
||||||
add_child(AcceptDialog.new())
|
add_child(AcceptDialog.new())
|
||||||
|
@ -2,7 +2,7 @@ extends Node2D
|
|||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
for _i in range(Autoload.RANGE):
|
for _i in range(5):
|
||||||
add_child(Node2D.new())
|
add_child(Node2D.new())
|
||||||
add_child(AnimatedSprite2D.new())
|
add_child(AnimatedSprite2D.new())
|
||||||
add_child(Area2D.new())
|
add_child(Area2D.new())
|
||||||
|
@ -2,7 +2,7 @@ extends Node
|
|||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
for _i in range(Autoload.RANGE):
|
for _i in range(5):
|
||||||
add_child(AnimationPlayer.new())
|
add_child(AnimationPlayer.new())
|
||||||
add_child(AnimationTree.new())
|
add_child(AnimationTree.new())
|
||||||
add_child(AudioStreamPlayer.new())
|
add_child(AudioStreamPlayer.new())
|
||||||
|
@ -2,7 +2,7 @@ extends Node3D
|
|||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
for i in range(Autoload.RANGE):
|
for i in range(5):
|
||||||
add_child(Node3D.new())
|
add_child(Node3D.new())
|
||||||
add_child(XRAnchor3D.new())
|
add_child(XRAnchor3D.new())
|
||||||
add_child(Camera3D.new())
|
add_child(Camera3D.new())
|
||||||
|
9
Start.gd
9
Start.gd
@ -1,7 +1,7 @@
|
|||||||
extends Control
|
extends Control
|
||||||
|
|
||||||
var current_scene : int = -1
|
var current_scene : int = -1
|
||||||
var time_to_switch : float
|
var time_to_switch : int
|
||||||
const NUMBER_OF_INSTANCES : int = 1 # Use more than 1 to stress test, 1 should be optimal for casual CI
|
const NUMBER_OF_INSTANCES : int = 1 # Use more than 1 to stress test, 1 should be optimal for casual CI
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
@ -14,10 +14,9 @@ func _ready():
|
|||||||
print(" - " + path)
|
print(" - " + path)
|
||||||
|
|
||||||
|
|
||||||
func _process(delta):
|
func _process(_delta):
|
||||||
time_to_switch -= delta
|
if time_to_switch - OS.get_ticks_msec() <= 0:
|
||||||
if time_to_switch <= 0:
|
time_to_switch = Autoload.time_for_each_step + OS.get_ticks_msec()
|
||||||
time_to_switch = Autoload.time_for_each_step
|
|
||||||
|
|
||||||
if current_scene < Autoload.alone_steps.size() - 1:
|
if current_scene < Autoload.alone_steps.size() - 1:
|
||||||
current_scene += 1
|
current_scene += 1
|
||||||
|
@ -28,3 +28,4 @@ bbcode_text = "Roman
|
|||||||
text = "Roman
|
text = "Roman
|
||||||
"
|
"
|
||||||
custom_effects = [ ]
|
custom_effects = [ ]
|
||||||
|
structured_text_bidi_override_options = [ ]
|
||||||
|
Loading…
Reference in New Issue
Block a user