Skip to content

Commit a5b85e3

Browse files
committed
Add environment variable CG_RUN_IN_VM to run the test in a VM in the m68k CI
1 parent 3021598 commit a5b85e3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/m68k.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
111111
cd tests/hello-world
112112
CG_RUSTFLAGS="-Clinker=m68k-unknown-linux-gnu-gcc" ../../y.sh cargo build --target m68k-unknown-linux-gnu
113-
CG_RUSTFLAGS="-Clinker=m68k-unknown-linux-gnu-gcc" ../../y.sh cargo run --target m68k-unknown-linux-gnu > hello_world_stdout
113+
CG_RUN_IN_VM=1 CG_RUSTFLAGS="-Clinker=m68k-unknown-linux-gnu-gcc" ../../y.sh cargo run --target m68k-unknown-linux-gnu > hello_world_stdout
114114
test $(cat hello_world_stdout) == "Hello, world!" || exit 1
115115
116116
# Summary job for the merge queue.

build_system/src/config.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,10 @@ impl ConfigInfo {
378378
self.run_in_vm = true;
379379
}
380380

381+
if std::env::var("CG_RUN_IN_VM").as_deref() == Ok("1") {
382+
self.run_in_vm = true;
383+
}
384+
381385
let current_dir =
382386
std_env::current_dir().map_err(|error| format!("`current_dir` failed: {error:?}"))?;
383387
let channel = if self.channel == Channel::Release {

0 commit comments

Comments
 (0)