Unverified Commit 6bd7dc46 authored by boklm's avatar boklm
Browse files

mochitests: handle case where failures file is not created

parent c94b2c61
......@@ -248,9 +248,10 @@ sub mochitest_test {
capture_exec('xvfb-run', '--server-args=-screen 0 1024x768x24',
'./mach', $mach_command, $test->{dir});
$test->{results}{out} = $out;
my $failed = decode_json(scalar read_file($failures_file));
$test->{results}{failed} = [ keys %$failed ];
$test->{results}{success} = ! @{$test->{results}{failed}};
my $failed = eval { -f $failures_file
&& decode_json(scalar read_file($failures_file)) };
$test->{results}{failed} = $failed ? [ keys %$failed ] : [];
$test->{results}{success} = $failed && ! @{$test->{results}{failed}};
}
sub build_firefox {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment