Unverified Commit a5dd49f6 authored by boklm's avatar boklm
Browse files

Simplify is_success

parent 504dbeb6
...@@ -202,6 +202,7 @@ sub mozmill_run { ...@@ -202,6 +202,7 @@ sub mozmill_run {
$i++; $i++;
} }
$test->{results} = decode_json(read_file($results_file)); $test->{results} = decode_json(read_file($results_file));
$test->{results}{success} = !$test->{results}{results}->[0]->{failed};
} }
sub selenium_run { sub selenium_run {
...@@ -228,12 +229,7 @@ sub run_tests { ...@@ -228,12 +229,7 @@ sub run_tests {
sub is_success { sub is_success {
my ($tests) = @_; my ($tests) = @_;
foreach my $test (keys %$tests) { foreach my $test (keys %$tests) {
if ($tests->{$test}{type} eq 'mozmill' if ($tests->{$test}{results} && !$tests->{$test}{results}{success}) {
&& $tests->{$test}{results}{results}->[0]->{failed}) {
return 0;
}
if (defined $tests->{$test}{results}{success} &&
!$tests->{$test}{results}{success}) {
return 0; return 0;
} }
} }
......
Markdown is supported
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