File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,17 +136,21 @@ impl Metrics for LargeScene {
136136 . into_iter ( )
137137 . flat_map ( |f| [ "--features" . to_string ( ) , f] ) ;
138138
139- let _guard = sh. push_env (
139+ let _ = cmd ! ( sh, "sudo systemctl start lightdm" ) . run ( ) ;
140+ thread:: sleep ( Duration :: from_secs ( 10 ) ) ;
141+
142+ let _mangohud_guard = sh. push_env (
140143 "MANGOHUD_CONFIG" ,
141144 format ! (
142145 "output_folder={},autostart_log=10" ,
143146 std:: env:: current_dir( ) . unwrap( ) . display( )
144147 ) ,
145148 ) ;
149+ let _display_guard = sh. push_env ( "DISPLAY" , ":0" ) ;
146150
147151 let cmd = cmd ! (
148152 sh,
149- "xvfb-run mangohud cargo run --release {features...} --package {scene} -- {parameters...}"
153+ "mangohud cargo run --release {features...} --package {scene} -- {parameters...}"
150154 ) ;
151155 let mut results = HashMap :: new ( ) ;
152156
@@ -158,7 +162,12 @@ impl Metrics for LargeScene {
158162 while gpu. try_recv ( ) . is_ok ( ) { }
159163
160164 let start = Instant :: now ( ) ;
161- if cmd. run ( ) . is_err ( ) {
165+ let cmd_result = cmd. run ( ) ;
166+
167+ let _ = cmd ! ( sh, "sudo systemctl stop lightdm" ) . run ( ) ;
168+ thread:: sleep ( Duration :: from_secs ( 5 ) ) ;
169+
170+ if cmd_result. is_err ( ) {
162171 // ignore failure due to a missing scene
163172 return results;
164173 } ;
Original file line number Diff line number Diff line change @@ -118,17 +118,21 @@ impl Metrics for StressTest {
118118 . into_iter ( )
119119 . flat_map ( |f| [ "--features" . to_string ( ) , f] ) ;
120120
121- let _guard = sh. push_env (
121+ let _ = cmd ! ( sh, "sudo systemctl start lightdm" ) . run ( ) ;
122+ thread:: sleep ( Duration :: from_secs ( 10 ) ) ;
123+
124+ let _mangohud_guard = sh. push_env (
122125 "MANGOHUD_CONFIG" ,
123126 format ! (
124127 "output_folder={},autostart_log=1" ,
125128 std:: env:: current_dir( ) . unwrap( ) . display( )
126129 ) ,
127130 ) ;
131+ let _display_guard = sh. push_env ( "DISPLAY" , ":0" ) ;
128132
129133 let cmd = cmd ! (
130134 sh,
131- "xvfb-run mangohud cargo run --release {features...} --example {stress_tests} -- {parameters...}"
135+ "mangohud cargo run --release {features...} --example {stress_tests} -- {parameters...}"
132136 ) ;
133137 let mut results = HashMap :: new ( ) ;
134138
@@ -140,7 +144,12 @@ impl Metrics for StressTest {
140144 while gpu. try_recv ( ) . is_ok ( ) { }
141145
142146 let start = Instant :: now ( ) ;
143- let Ok ( output) = cmd. output ( ) else {
147+ let cmd_output = cmd. output ( ) ;
148+
149+ let _ = cmd ! ( sh, "sudo systemctl stop lightdm" ) . run ( ) ;
150+ thread:: sleep ( Duration :: from_secs ( 5 ) ) ;
151+
152+ let Ok ( output) = cmd_output else {
144153 // ignore failure due to a missing stress test
145154 return results;
146155 } ;
You can’t perform that action at this time.
0 commit comments