@@ -153,7 +153,7 @@ fn run_pretty_test(config: &config, props: &TestProps, testfile: &Path) {
153
153
let rounds =
154
154
match props. pp_exact { Some ( _) => 1 , None => 2 } ;
155
155
156
- let src = File :: open ( testfile) . read_to_end ( ) ;
156
+ let src = File :: open ( testfile) . read_to_end ( ) . unwrap ( ) ;
157
157
let src = str:: from_utf8_owned ( src) . unwrap ( ) ;
158
158
let mut srcs = ~[ src] ;
159
159
@@ -175,7 +175,7 @@ fn run_pretty_test(config: &config, props: &TestProps, testfile: &Path) {
175
175
let mut expected = match props. pp_exact {
176
176
Some ( ref file) => {
177
177
let filepath = testfile. dir_path ( ) . join ( file) ;
178
- let s = File :: open ( & filepath) . read_to_end ( ) ;
178
+ let s = File :: open ( & filepath) . read_to_end ( ) . unwrap ( ) ;
179
179
str:: from_utf8_owned ( s) . unwrap ( )
180
180
}
181
181
None => { srcs[ srcs. len ( ) - 2 u] . clone ( ) }
@@ -318,8 +318,10 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
318
318
//waiting 1 second for gdbserver start
319
319
timer:: sleep( 1000 ) ;
320
320
let result = task:: try( proc( ) {
321
- tcp:: TcpStream :: connect(
322
- SocketAddr { ip : Ipv4Addr ( 127 , 0 , 0 , 1 ) , port : 5039 } ) ;
321
+ tcp:: TcpStream :: connect( SocketAddr {
322
+ ip : Ipv4Addr ( 127 , 0 , 0 , 1 ) ,
323
+ port : 5039 ,
324
+ } ) . unwrap( ) ;
323
325
} ) ;
324
326
if result. is_err( ) {
325
327
continue ;
@@ -361,7 +363,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
361
363
stdout : out,
362
364
stderr : err,
363
365
cmdline : cmdline} ;
364
- process. force_destroy( ) ;
366
+ process. force_destroy( ) . unwrap ( ) ;
365
367
}
366
368
367
369
_=> {
@@ -727,7 +729,7 @@ fn compose_and_run_compiler(
727
729
728
730
fn ensure_dir ( path : & Path ) {
729
731
if path. is_dir ( ) { return ; }
730
- fs:: mkdir ( path, io:: UserRWX ) ;
732
+ fs:: mkdir ( path, io:: UserRWX ) . unwrap ( ) ;
731
733
}
732
734
733
735
fn compose_and_run ( config : & config , testfile : & Path ,
@@ -852,7 +854,7 @@ fn dump_output(config: &config, testfile: &Path, out: &str, err: &str) {
852
854
fn dump_output_file ( config : & config , testfile : & Path ,
853
855
out : & str , extension : & str ) {
854
856
let outfile = make_out_name ( config, testfile, extension) ;
855
- File :: create ( & outfile) . write ( out. as_bytes ( ) ) ;
857
+ File :: create ( & outfile) . write ( out. as_bytes ( ) ) . unwrap ( ) ;
856
858
}
857
859
858
860
fn make_out_name ( config : & config , testfile : & Path , extension : & str ) -> Path {
@@ -1003,7 +1005,7 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
1003
1005
fn _arm_push_aux_shared_library ( config : & config , testfile : & Path ) {
1004
1006
let tdir = aux_output_dir_name ( config, testfile) ;
1005
1007
1006
- let dirs = fs:: readdir ( & tdir) ;
1008
+ let dirs = fs:: readdir ( & tdir) . unwrap ( ) ;
1007
1009
for file in dirs. iter ( ) {
1008
1010
if file. extension_str ( ) == Some ( "so" ) {
1009
1011
// FIXME (#9639): This needs to handle non-utf8 paths
@@ -1099,7 +1101,7 @@ fn disassemble_extract(config: &config, _props: &TestProps,
1099
1101
1100
1102
1101
1103
fn count_extracted_lines ( p : & Path ) -> uint {
1102
- let x = File :: open ( & p. with_extension ( "ll" ) ) . read_to_end ( ) ;
1104
+ let x = File :: open ( & p. with_extension ( "ll" ) ) . read_to_end ( ) . unwrap ( ) ;
1103
1105
let x = str:: from_utf8_owned ( x) . unwrap ( ) ;
1104
1106
x. lines ( ) . len ( )
1105
1107
}
0 commit comments