@@ -214,19 +214,19 @@ mod tests {
214214 if #[ cfg( target_arch = "arm" ) ] {
215215 #[ test]
216216 fn linux_rpi3( ) {
217- let v = auxv_from_file (
218- "../../std_detect/detect/test_data/linux-rpi3.auxv" ,
219- ) . unwrap( ) ;
217+ let file = concat! ( env! ( "CARGO_MANIFEST_DIR" ) , "/src/detect/test_data/linux-rpi3.auxv" ) ;
218+ println! ( "file: {}" , file ) ;
219+ let v = auxv_from_file ( file ) . unwrap( ) ;
220220 assert_eq!( v. hwcap, 4174038 ) ;
221221 assert_eq!( v. hwcap2, 16 ) ;
222222 }
223223
224224 #[ test]
225225 #[ should_panic]
226226 fn linux_macos_vb( ) {
227- let _ = auxv_from_file (
228- "../../std_detect/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv"
229- ) . unwrap( ) ;
227+ let file = concat! ( env! ( "CARGO_MANIFEST_DIR" ) , "/src/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv" ) ;
228+ println! ( "file: {}" , file ) ;
229+ let v = auxv_from_file ( file ) . unwrap( ) ;
230230 // this file is incomplete (contains hwcap but not hwcap2), we
231231 // want to fall back to /proc/cpuinfo in this case, so
232232 // reading should fail. assert_eq!(v.hwcap, 126614527);
@@ -235,9 +235,9 @@ mod tests {
235235 } else if #[ cfg( target_arch = "aarch64" ) ] {
236236 #[ test]
237237 fn linux_x64( ) {
238- let v = auxv_from_file (
239- "../../std_detect/detect/test_data/linux-x64-i7-6850k.auxv" ,
240- ) . unwrap( ) ;
238+ let file = concat! ( env! ( "CARGO_MANIFEST_DIR" ) , "/src/detect/test_data/linux-x64-i7-6850k.auxv" ) ;
239+ println! ( "file: {}" , file ) ;
240+ let v = auxv_from_file ( file ) . unwrap( ) ;
241241 assert_eq!( v. hwcap, 3219913727 ) ;
242242 }
243243 }
0 commit comments