File tree 8 files changed +45
-27
lines changed
invalid-symlink-search-path
8 files changed +45
-27
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ run-make/interdependent-c-libraries/Makefile
38
38
run-make/issue-107094/Makefile
39
39
run-make/issue-14698/Makefile
40
40
run-make/issue-15460/Makefile
41
- run-make/issue-26006/Makefile
42
41
run-make/issue-28595/Makefile
43
42
run-make/issue-33329/Makefile
44
43
run-make/issue-35164/Makefile
Original file line number Diff line number Diff line change
1
+ extern crate foo;
2
+
3
+ pub fn main ( ) {
4
+ let _ = foo:: hello_world ( ) ;
5
+ }
Original file line number Diff line number Diff line change
1
+ pub fn hello_world ( ) -> i32 {
2
+ 42
3
+ }
Original file line number Diff line number Diff line change
1
+ // In this test, the symlink created is invalid (valid relative to the root, but not
2
+ // relatively to where it is located), and used to cause an internal
3
+ // compiler error (ICE) when passed as a library search path. This was fixed in #26044,
4
+ // and this test checks that the invalid symlink is instead simply ignored.
5
+ // See https://github.com/rust-lang/rust/issues/26006
6
+
7
+ //@ needs-symlink
8
+ //Reason: symlink requires elevated permission in Windows
9
+
10
+ use run_make_support:: { rfs, rustc} ;
11
+
12
+ fn main ( ) {
13
+ // We create two libs: `bar` which depends on `foo`. We need to compile `foo` first.
14
+ rfs:: create_dir ( "out" ) ;
15
+ rfs:: create_dir ( "out/foo" ) ;
16
+ rustc ( )
17
+ . input ( "in/foo/lib.rs" )
18
+ . crate_name ( "foo" )
19
+ . crate_type ( "lib" )
20
+ . metadata ( "foo" )
21
+ . output ( "out/foo/libfoo.rlib" )
22
+ . run ( ) ;
23
+ rfs:: create_dir ( "out/bar" ) ;
24
+ rfs:: create_dir ( "out/bar/deps" ) ;
25
+ rfs:: create_symlink ( "out/foo/libfoo.rlib" , "out/bar/deps/libfoo.rlib" ) ;
26
+ // Check that the invalid symlink does not cause an ICE
27
+ rustc ( )
28
+ . input ( "in/bar/lib.rs" )
29
+ . library_search_path ( "dependency=out/bar/deps" )
30
+ . run_fail ( )
31
+ . assert_exit_code ( 1 )
32
+ . assert_stderr_not_contains ( "internal compiler error" ) ;
33
+ }
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3
3
// After this was fixed in #22135, this test checks that this bug does not make a resurgence.
4
4
// See https://github.com/rust-lang/rust/issues/22131
5
5
6
- //FIXME(Oneirical): try test-various
6
+ //@ ignore-cross-compile
7
+ // Reason: rustdoc fails to find the "foo" crate
7
8
8
- use run_make_support:: { rustc, rustdoc} ;
9
+ use run_make_support:: { cwd , rustc, rustdoc} ;
9
10
10
11
fn main ( ) {
11
12
rustc ( ) . cfg ( r#"feature="bar""# ) . crate_type ( "lib" ) . input ( "foo.rs" ) . run ( ) ;
12
13
rustdoc ( )
13
14
. arg ( "--test" )
14
15
. arg ( "--cfg" )
15
16
. arg ( r#"feature="bar""# )
17
+ . library_search_path ( cwd ( ) )
16
18
. input ( "foo.rs" )
17
19
. run ( )
18
20
. assert_stdout_contains ( "foo.rs - foo (line 1) ... ok" ) ;
You can’t perform that action at this time.
0 commit comments