This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +22
-14
lines changed Expand file tree Collapse file tree 3 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,6 @@ run-make/pgo-indirect-call-promotion/Makefile
113113run-make/pointer-auth-link-with-c/Makefile
114114run-make/print-calling-conventions/Makefile
115115run-make/print-target-list/Makefile
116- run-make/profile/Makefile
117116run-make/prune-link-args/Makefile
118117run-make/raw-dylib-alt-calling-convention/Makefile
119118run-make/raw-dylib-c/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // This test revolves around the rustc flag -Z profile, which should
2+ // generate a .gcno file (initial profiling information) as well
3+ // as a .gcda file (branch counters). The path where these are emitted
4+ // should also be configurable with -Z profile-emit. This test checks
5+ // that the files are produced, and then that the latter flag is respected.
6+ // See https://github.com/rust-lang/rust/pull/42433
7+
8+ //@ ignore-cross-compile
9+ //@ needs-profiler-support
10+
11+ use run_make_support:: { run, rustc} ;
12+ use std:: path:: Path ;
13+
14+ fn main ( ) {
15+ rustc ( ) . arg ( "-g" ) . arg ( "-Zprofile" ) . input ( "test.rs" ) . run ( ) ;
16+ run ( "test" ) ;
17+ assert ! ( Path :: new( "test.gcno" ) . exists( ) , "no .gcno file" ) ;
18+ assert ! ( Path :: new( "test.gcda" ) . exists( ) , "no .gcda file" ) ;
19+ rustc ( ) . arg ( "-g" ) . arg ( "-Zprofile" ) . arg ( "-Zprofile-emit=abc/abc.gcda" ) . input ( "test.rs" ) . run ( ) ;
20+ run ( "test" ) ;
21+ assert ! ( Path :: new( "abc/abc.gcda" ) . exists( ) , "gcda file not emitted to defined path" ) ;
22+ }
You can’t perform that action at this time.
0 commit comments