@@ -214,19 +214,19 @@ mod tests {
214
214
if #[ cfg( target_arch = "arm" ) ] {
215
215
#[ test]
216
216
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( ) ;
220
220
assert_eq!( v. hwcap, 4174038 ) ;
221
221
assert_eq!( v. hwcap2, 16 ) ;
222
222
}
223
223
224
224
#[ test]
225
225
#[ should_panic]
226
226
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( ) ;
230
230
// this file is incomplete (contains hwcap but not hwcap2), we
231
231
// want to fall back to /proc/cpuinfo in this case, so
232
232
// reading should fail. assert_eq!(v.hwcap, 126614527);
@@ -235,9 +235,9 @@ mod tests {
235
235
} else if #[ cfg( target_arch = "aarch64" ) ] {
236
236
#[ test]
237
237
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( ) ;
241
241
assert_eq!( v. hwcap, 3219913727 ) ;
242
242
}
243
243
}
0 commit comments