File tree 1 file changed +15
-2
lines changed
src/tools/compiletest/src
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
use std:: borrow:: Cow ;
2
2
use std:: collections:: { HashMap , HashSet } ;
3
- use std:: ffi:: OsString ;
3
+ use std:: ffi:: { OsStr , OsString } ;
4
4
use std:: fs:: { self , File , create_dir_all} ;
5
5
use std:: hash:: { DefaultHasher , Hash , Hasher } ;
6
6
use std:: io:: prelude:: * ;
@@ -1836,7 +1836,20 @@ impl<'test> TestCx<'test> {
1836
1836
return ;
1837
1837
}
1838
1838
1839
- let proc_name = Path :: new ( proc_name) . file_name ( ) . unwrap ( ) . to_string_lossy ( ) ;
1839
+ let path = Path :: new ( proc_name) ;
1840
+ let proc_name = if path. file_stem ( ) . is_some_and ( |p| p == "rmake" ) {
1841
+ OsString :: from_iter (
1842
+ path. parent ( )
1843
+ . unwrap ( )
1844
+ . file_name ( )
1845
+ . into_iter ( )
1846
+ . chain ( Some ( OsStr :: new ( "/" ) ) )
1847
+ . chain ( path. file_name ( ) ) ,
1848
+ )
1849
+ } else {
1850
+ path. file_name ( ) . unwrap ( ) . into ( )
1851
+ } ;
1852
+ let proc_name = proc_name. to_string_lossy ( ) ;
1840
1853
println ! ( "------{proc_name} stdout------------------------------" ) ;
1841
1854
println ! ( "{}" , out) ;
1842
1855
println ! ( "------{proc_name} stderr------------------------------" ) ;
You can’t perform that action at this time.
0 commit comments