Fixing broken tests #62401
The grouping led to a lot of `mv`. Therefore, some relative paths were wrong. In this commit the dependent files were also moved so that the paths work again.
This commit is contained in:
parent
98325eb592
commit
cac53fe3f2
9 changed files with 136 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
// run-pass
|
||||
// aux-build:anon-extern-mod-cross-crate-1.rs
|
||||
// pretty-expanded FIXME #23616
|
||||
// ignore-wasm32-bare no libc to test ffi with
|
||||
|
||||
extern crate anonexternmod;
|
||||
|
||||
use anonexternmod::rust_get_test_int;
|
||||
|
||||
pub fn main() {
|
||||
unsafe {
|
||||
rust_get_test_int();
|
||||
}
|
||||
}
|
8
src/test/run-pass/abi/duplicated-external-mods.rs
Normal file
8
src/test/run-pass/abi/duplicated-external-mods.rs
Normal file
|
@ -0,0 +1,8 @@
|
|||
// aux-build:anon-extern-mod-cross-crate-1.rs
|
||||
// aux-build:anon-extern-mod-cross-crate-1.rs
|
||||
// pretty-expanded FIXME #23616
|
||||
// ignore-wasm32-bare no libc to test ffi with
|
||||
|
||||
extern crate anonexternmod;
|
||||
|
||||
pub fn main() { }
|
21
src/test/run-pass/abi/extern/extern-crosscrate.rs
vendored
Normal file
21
src/test/run-pass/abi/extern/extern-crosscrate.rs
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
// run-pass
|
||||
// aux-build:extern-crosscrate-source.rs
|
||||
// ignore-wasm32-bare no libc to test ffi with
|
||||
|
||||
#![feature(rustc_private)]
|
||||
|
||||
extern crate externcallback;
|
||||
extern crate libc;
|
||||
|
||||
fn fact(n: libc::uintptr_t) -> libc::uintptr_t {
|
||||
unsafe {
|
||||
println!("n = {}", n);
|
||||
externcallback::rustrt::rust_dbg_call(externcallback::cb, n)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
let result = fact(10);
|
||||
println!("result = {}", result);
|
||||
assert_eq!(result, 3628800);
|
||||
}
|
17
src/test/run-pass/abi/foreign/foreign-dupe.rs
Normal file
17
src/test/run-pass/abi/foreign/foreign-dupe.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
// run-pass
|
||||
// aux-build:foreign_lib.rs
|
||||
// ignore-wasm32-bare no libc to test ffi with
|
||||
|
||||
// Check that we can still call duplicated extern (imported) functions
|
||||
// which were declared in another crate. See issues #32740 and #32783.
|
||||
|
||||
|
||||
extern crate foreign_lib;
|
||||
|
||||
pub fn main() {
|
||||
unsafe {
|
||||
let x = foreign_lib::rustrt::rust_get_test_int();
|
||||
assert_eq!(x, foreign_lib::rustrt2::rust_get_test_int());
|
||||
assert_eq!(x as *const _, foreign_lib::rustrt3::rust_get_test_int());
|
||||
}
|
||||
}
|
16
src/test/run-pass/abi/invoke-external-foreign.rs
Normal file
16
src/test/run-pass/abi/invoke-external-foreign.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
// aux-build:foreign_lib.rs
|
||||
// ignore-wasm32-bare no libc to test ffi with
|
||||
|
||||
// The purpose of this test is to check that we can
|
||||
// successfully (and safely) invoke external, cdecl
|
||||
// functions from outside the crate.
|
||||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate foreign_lib;
|
||||
|
||||
pub fn main() {
|
||||
unsafe {
|
||||
let _foo = foreign_lib::rustrt::rust_get_test_int();
|
||||
}
|
||||
}
|
3
src/test/run-pass/abi/issues/auxiliary/issue-25185-2.rs
Normal file
3
src/test/run-pass/abi/issues/auxiliary/issue-25185-2.rs
Normal file
|
@ -0,0 +1,3 @@
|
|||
extern crate issue_25185_1;
|
||||
|
||||
pub use issue_25185_1::rust_dbg_extern_identity_u32;
|
13
src/test/run-pass/abi/issues/issue-25185.rs
Normal file
13
src/test/run-pass/abi/issues/issue-25185.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
// run-pass
|
||||
// aux-build:issue-25185-1.rs
|
||||
// aux-build:issue-25185-2.rs
|
||||
// ignore-wasm32-bare no libc for ffi testing
|
||||
|
||||
extern crate issue_25185_2;
|
||||
|
||||
fn main() {
|
||||
let x = unsafe {
|
||||
issue_25185_2::rust_dbg_extern_identity_u32(1)
|
||||
};
|
||||
assert_eq!(x, 1);
|
||||
}
|
26
src/test/run-pass/abi/proc_macro/auxiliary/test-macros.rs
Normal file
26
src/test/run-pass/abi/proc_macro/auxiliary/test-macros.rs
Normal file
|
@ -0,0 +1,26 @@
|
|||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn nop_attr(_attr: TokenStream, input: TokenStream) -> TokenStream {
|
||||
assert!(_attr.to_string().is_empty());
|
||||
input
|
||||
}
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn no_output(_attr: TokenStream, _input: TokenStream) -> TokenStream {
|
||||
assert!(_attr.to_string().is_empty());
|
||||
assert!(!_input.to_string().is_empty());
|
||||
"".parse().unwrap()
|
||||
}
|
||||
|
||||
#[proc_macro]
|
||||
pub fn emit_input(input: TokenStream) -> TokenStream {
|
||||
input
|
||||
}
|
18
src/test/run-pass/abi/stack-probes-lto.rs
Normal file
18
src/test/run-pass/abi/stack-probes-lto.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
// ignore-arm
|
||||
// ignore-aarch64
|
||||
// ignore-mips
|
||||
// ignore-mips64
|
||||
// ignore-powerpc
|
||||
// ignore-s390x
|
||||
// ignore-sparc
|
||||
// ignore-sparc64
|
||||
// ignore-wasm
|
||||
// ignore-cloudabi no processes
|
||||
// ignore-emscripten no processes
|
||||
// ignore-sgx no processes
|
||||
// ignore-musl FIXME #31506
|
||||
// ignore-pretty
|
||||
// compile-flags: -C lto
|
||||
// no-prefer-dynamic
|
||||
|
||||
include!("stack-probes.rs");
|
Loading…
Add table
Add a link
Reference in a new issue