File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -126,13 +126,15 @@ mod integration_tests {
126126
127127 /// Helper function to get the path to the binary
128128 fn get_binary_path ( ) -> String {
129- let target_dir = std:: env:: var ( "CARGO_TARGET_DIR" ) . unwrap_or_else ( |_| "target" . to_string ( ) ) ;
130- let profile = if cfg ! ( debug_assertions) {
131- "debug"
132- } else {
133- "release"
134- } ;
135- format ! ( "{}/{}/trustworthiness_checker" , target_dir, profile)
129+ let out_dir = std:: env:: var ( "OUT_DIR" ) . expect ( "OUT_DIR not defined" ) ;
130+ let path = Path :: new ( & out_dir) ;
131+ let tc_dir_path = path
132+ . parent ( )
133+ . and_then ( |p| p. parent ( ) )
134+ . and_then ( |p| p. parent ( ) )
135+ . expect ( "OUT_DIR too shallow" ) ;
136+ let tc_dir = tc_dir_path. to_str ( ) . expect ( "Invalid UTF-8 in path" ) ;
137+ format ! ( "{}/trustworthiness_checker" , tc_dir)
136138 }
137139
138140 /// Helper function to run the CLI with given arguments and return output
You can’t perform that action at this time.
0 commit comments