Skip to content

Commit

Permalink
Silence the segfault error in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
StatisMike committed Aug 3, 2024
1 parent ac5eacf commit cecbc55
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 10 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/reusable_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,17 @@ jobs:
if: inputs.release != true
shell: bash
run: |
set +e
/usr/bin/mkdir -p /home/runner/.local/share/godot/builds/LinuxHeadless
${{ env.GODOT4_BIN }} --headless --path tests/godot --export-debug Linux/Headless /home/runner/.local/share/godot/builds/LinuxHeadless/test_headless.x86_64
${{ env.GODOT4_BIN }} --headless --path tests/godot --export-debug Linux/Headless /home/runner/.local/share/godot/builds/LinuxHeadless/test_headless.x86_64 || true
- name: Export godot project (release)
if: inputs.release == true
shell: bash
run: |
set +e
/usr/bin/mkdir -p /home/runner/.local/share/godot/builds/LinuxHeadless
${{ env.GODOT4_BIN }} --headless --path tests/godot --export-release Linux/Headless /home/runner/.local/share/godot/builds/LinuxHeadless/test_headless.x86_64
${{ env.GODOT4_BIN }} --headless --path tests/godot --export-release Linux/Headless /home/runner/.local/share/godot/builds/LinuxHeadless/test_headless.x86_64 || true
- name: Run Godot integration tests (export)
shell: bash
Expand Down
2 changes: 0 additions & 2 deletions gd-props-macros/src/main_attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ pub fn gd_plugin_parser(decl: Declaration) -> Result<TokenStream, venial::Error>
}

fn enter_tree(&mut self) {
::godot::log::godot_print!("Plugin entered tree!");
let exporter = ::godot::obj::Gd::<#exporter>::default();

<Self as ::godot::obj::WithBaseField>::base_mut(self)
Expand All @@ -55,7 +54,6 @@ pub fn gd_plugin_parser(decl: Declaration) -> Result<TokenStream, venial::Error>

<Self as ::godot::obj::WithBaseField>::base_mut(self)
.remove_export_plugin(exporter.upcast());
::godot::log::godot_print!("Removed export plugin!");

self.exporter = None;
}
Expand Down
32 changes: 29 additions & 3 deletions tests/godot/export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,38 @@
name="Linux/Headless"
platform="Linux/X11"
runnable=true
dedicated_server=false
dedicated_server=true
custom_features="headless"
export_filter="all_resources"
export_filter="customized"
customized_files={
"res://": "strip",
"res://UID_check/": "strip",
"res://UID_check/UID_check.gd": "strip",
"res://UID_check/UID_check.tscn": "strip",
"res://dev_test.tscn": "strip",
"res://export_test.tscn": "strip",
"res://export_test/": "strip",
"res://export_test/GodotTestResource.tres": "strip",
"res://export_test/TestResource.gdron": "strip",
"res://export_test/TestResource2.gdron": "strip",
"res://export_test/WithBundled.gdron": "strip",
"res://export_test/WithExt.gdron": "strip",
"res://ext_test/": "strip",
"res://ext_test/test_ext.gdron": "strip",
"res://ext_test/test_godot_res.tres": "strip",
"res://ext_test/test_resource.gdbin": "strip",
"res://ext_test/test_resource.gdron": "strip",
"res://icon.svg": "strip",
"res://load_bench/": "strip",
"res://load_bench/test.gdbin": "strip",
"res://load_bench/test.gdron": "strip",
"res://load_bench/test_long.gdbin": "strip",
"res://load_bench/test_long.gdron": "strip",
"res://tests.gdextension": "strip"
}
include_filter=""
exclude_filter=""
export_path="../../../exported_prop_test/gd-props tests 3.x86_64"
export_path="test_headless.x86_64"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
Expand Down
3 changes: 0 additions & 3 deletions tests/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ unsafe impl ExtensionLibrary for GodotIoTests {

fn on_level_deinit(deinit: InitLevel) {
if deinit == InitLevel::Scene {
godot::log::godot_print!("Level deinit");
use gd_props::traits::GdPropLoader as _;
use gd_props::traits::GdPropSaver as _;
godot::log::godot_print!("Unregistering saver");
PropPluginSaver::unregister_saver();
godot::log::godot_print!("Unregistering loader");
PropPluginLoader::unregister_loader();
}
}
Expand Down

0 comments on commit cecbc55

Please sign in to comment.