Remove bin_nostd test, it will likely to finicky.

This commit is contained in:
Eric Huss 2019-08-15 18:21:37 -07:00
parent 3e82792c4f
commit aee4048229

View File

@ -32,7 +32,6 @@ fn std_lib() {
simple_lib_std();
simple_bin_std();
lib_nostd();
bin_nostd();
check_core();
cross_custom();
hashbrown();
@ -79,59 +78,6 @@ fn lib_nostd() {
.run();
}
fn bin_nostd() {
if cfg!(windows) {
// I think windows requires setting up mainCRTStartup,
// I'm not in the mood to figure it out.
return;
}
let p = project()
.file("src/lib.rs", "#![no_std] pub fn foo() {}")
.file(
"src/main.rs",
r#"
#![no_std]
#![feature(lang_items, start, core_intrinsics)]
use core::panic::PanicInfo;
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
unsafe { core::intrinsics::abort() }
}
#[start]
fn start(_argc: isize, _argv: *const *const u8) -> isize {
foo::foo();
123
}
#[lang = "eh_personality"]
extern fn eh_personality() {}
"#,
)
.file(
"build.rs",
r#"
fn main() {
let target = std::env::var("TARGET").expect("TARGET was not set");
if target.contains("apple-darwin") {
println!("cargo:rustc-link-lib=System");
} else if target.contains("linux") {
// TODO: why is this needed?
println!("cargo:rustc-link-lib=c");
}
}
"#,
)
.build();
cargo_build_std(&p, "run -v", "core")
.with_status(123)
.with_stderr_contains("[RUNNING] [..]foo[EXE]`")
.run();
}
fn check_core() {
let p = project()
.file("src/lib.rs", "#![no_std] fn unused_fn() {}")