Skip to content

Commit 6bd1642

Browse files
committed
More smoke tests
1 parent 2e0f9f1 commit 6bd1642

4 files changed

Lines changed: 265 additions & 95 deletions

File tree

config-smoke.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"controller_layout_id": "test-layout",
44
"add_to_steam_on_install_where_applicable": false
55
},
6-
"known_categories": ["smoke"],
6+
"known_categories": ["smoke", "smoke2"],
77
"tricks": [
88
{
99
"id": "AAA-fail",
@@ -43,9 +43,23 @@
4343
"echo 'ZZZ-fail ran, alright' && false"
4444
]
4545
},
46-
"categories": ["smoke"],
46+
"categories": ["smoke", "smoke2"],
4747
"display_name": "ZZZ Fail",
4848
"description": "Always fails, for testing"
49+
},
50+
{
51+
"id": "CCC-pass",
52+
"provider_config": {
53+
"type": "simple-command",
54+
"command": "/bin/bash",
55+
"args": [
56+
"-c",
57+
"echo 'CCC-pass ran, alright'"
58+
]
59+
},
60+
"categories": ["smoke"],
61+
"display_name": "CCC Pass",
62+
"description": "Always passes, for testing"
4963
}
5064
]
5165
}

gui/godot/assets/ibm_plex_mono/IBMPlexMono-SemiBoldItalic.ttf.import

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
importer="font_data_dynamic"
44
type="FontFile"
5-
uid="uid://dr7tf2g6xpp4s"
5+
uid="uid://bma5p7la7tlke"
66
path="res://.godot/imported/IBMPlexMono-SemiBoldItalic.ttf-2a22c508bad20ef6a18038769b74e528.fontdata"
77

88
[deps]

gui/rust/src/bin/gui_tool.rs

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,41 @@ fn copy_cdylib_into_godot_build(is_debug_build: bool) {
113113

114114
fn godot_import() {
115115
let godot_bin = resolve_godot_bin();
116-
let mut cmd = Command::new(&godot_bin);
117-
cmd.current_dir(GODOT_BASE_DIR)
118-
.args(["--import"]) // ensure import database updated
119-
.args(["--headless"]) // run without GUI for CI
120-
.stdout(Stdio::inherit())
121-
.stderr(Stdio::inherit());
122-
run_cmd(cmd, &format!("{} --import --headless", godot_bin));
116+
let human = format!("{} --import --headless", godot_bin);
117+
for attempt in 1..=2 {
118+
let mut cmd = Command::new(&godot_bin);
119+
cmd.current_dir(GODOT_BASE_DIR)
120+
.args(["--import"]) // ensure import database updated
121+
.args(["--headless"]) // run without GUI for CI
122+
.stdout(Stdio::inherit())
123+
.stderr(Stdio::inherit());
124+
125+
match cmd.status() {
126+
Ok(status) if status.success() => {
127+
return;
128+
}
129+
Ok(status) => {
130+
eprintln!(
131+
"Import attempt {} failed ({}): exit status {:?}",
132+
attempt, human, status
133+
);
134+
}
135+
Err(e) => {
136+
eprintln!(
137+
"Failed to run {} (attempt {}): {}",
138+
human, attempt, e
139+
);
140+
}
141+
}
142+
143+
if attempt == 1 {
144+
eprintln!("Retrying Godot import once due to transient failure...");
145+
std::thread::sleep(std::time::Duration::from_millis(300));
146+
continue;
147+
}
148+
}
149+
eprintln!("Godot import failed after retry.");
150+
std::process::exit(1);
123151
}
124152

125153
fn godot_export(is_debug_build: bool) {

0 commit comments

Comments
 (0)