mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
kernel: don't use debug_here in CI
When running in CI, cause processes to panic rather than waiting for a debugger to attach. This will ensure test failures are caught sooner rather than later. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
4901453e3d
commit
973e4601e4
2 changed files with 7 additions and 1 deletions
|
|
@ -46,4 +46,10 @@ fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("cargo:rerun-if-changed=build.rs");
|
println!("cargo:rerun-if-changed=build.rs");
|
||||||
|
|
||||||
|
// CI sets this variable. This changes how the panic handler works.
|
||||||
|
println!("cargo:rerun-if-env-changed=CI");
|
||||||
|
if option_env!("CI").is_some() {
|
||||||
|
println!("cargp:rustc-cfg=ci");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ pub extern "C" fn kmain() {
|
||||||
// Note that at this point, no new direct children of INIT may be created.
|
// Note that at this point, no new direct children of INIT may be created.
|
||||||
let mut pid = None;
|
let mut pid = None;
|
||||||
|
|
||||||
#[cfg(not(target_os = "none"))]
|
#[cfg(not(any(target_os = "none", all(ci, test))))]
|
||||||
{
|
{
|
||||||
use std::panic;
|
use std::panic;
|
||||||
panic::set_hook(Box::new(|arg| {
|
panic::set_hook(Box::new(|arg| {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue