Skip to content

Commit

Permalink
Clean 3.x branch (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
qarmin authored Jan 5, 2022
1 parent e59d9cb commit 1aff26a
Show file tree
Hide file tree
Showing 16 changed files with 232 additions and 717 deletions.
File renamed without changes.
File renamed without changes.
13 changes: 7 additions & 6 deletions .github/workflows/required.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm \
xvfb wget2 unzip python scons git
# Allows to test project with precompiled binaries
# - name: Download Godot
# run: |
# wget2 https://downloads.tuxfamily.org/godotengine/3.2.4/beta1/Godot_v3.2.4-beta1_x11.64.zip
Expand Down Expand Up @@ -63,11 +64,11 @@ jobs:
- name: Test project
run: |
DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s 60 --audio-driver Dummy --video-driver GLES3 --path $(pwd) 2>&1 | tee sanitizers_log.txt || true
DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s 180 --audio-driver Dummy --video-driver GLES3 --path $(pwd) 2>&1 | tee sanitizers_log.txt || true
misc/check_ci_log.py sanitizers_log.txt
- uses: actions/upload-artifact@v2
with:
name: ${{ github.job }}
path: godot.x11.tools.64s
retention-days: 14
# - uses: actions/upload-artifact@v2
# with:
# name: ${{ github.job }}
# path: godot.x11.tools.64s
# retention-days: 14
File renamed without changes.
File renamed without changes.
18 changes: 10 additions & 8 deletions Autoload/Autoload.gd
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,22 @@ const alone_steps: Array = [
"res://Nodes/Nodes.tscn",
"res://Physics/2D/Physics2D.tscn",
"res://Physics/3D/Physics3D.tscn",
"res://ReparentingDeleting/ReparentingDeleting.tscn",
"res://AutomaticBugs/FunctionExecutor.tscn", # Only runs
# "res://ReparentingDeleting/ReparentingDeleting.tscn", Not always reproducible
"res://AutomaticBugs/FunctionExecutor.tscn", # Only need to run once
]

var time_object : Object
var time_object: Object


func _init():
# Workaround for Time/OS breaking change - https://github.com/godotengine/godot/pull/54056
if ClassDB.class_exists("_Time"):
time_object = ClassDB.instance("_Time")
elif ClassDB.class_exists("Time"):
time_object = ClassDB.instance("Time")
else:
time_object = ClassDB.instance("_OS")



start_time = time_object.get_ticks_msec()

# In case when user doesn't provide time
Expand All @@ -45,20 +46,21 @@ func _init():
time_to_show = int(argument.to_float() * 1000)
time_for_each_step = time_to_show / (alone_steps.size())
print("Time set to: " + str(time_to_show / 1000.0) + " seconds with " + str(alone_steps.size()) + " steps, each step will take " + str(time_for_each_step / 1000.0) + " seconds.")
break # We only need to take first argument
break # We only need to take first numeric argument


func _process(delta: float) -> void:
var current_run_time: int = time_object.get_ticks_msec() - start_time

# While loop instead if, will allow to properly flush results under heavy operations(e.g. Thread sanitizer)
# While loop instead simple if, because will allow to properly flush results under heavy operations(e.g. Thread sanitizer)
while current_run_time > time_to_print_next_time:
print("Test is running now " + str(int(time_to_print_next_time / 1000)) + " seconds")
time_to_print_next_time += PRINT_TIME_EVERY_MILISECONDS

if current_run_time > time_to_show && can_be_closed:
print("######################## Ending test ########################")
get_tree().quit()



func _exit_tree() -> void:
time_object.free()
Loading

0 comments on commit 1aff26a

Please sign in to comment.