Message ID | 1475756065-5242-3-git-send-email-ian.jackson@eu.citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/sg-report-flight b/sg-report-flight index dbb17be..c66525b 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -774,7 +774,7 @@ END @failures= sort { $a->{DurationEstimate} <=> $b->{DurationEstimate} - or $a->{Step}{stepno} <=> $b->{Step}{stepno} + or ($a->{Step}{stepno} || 0) <=> ($b->{Step}{stepno} || 0) # stepno is sequential only within each job, so strictly # speaking this is not really a valid comparison: we will # usually be comparing failed steps in different jobs. But
If no steps in a job are executed, there can be a failure with a synthetic step row, containing a stepno of ''. This causes a perl warning when compared with <=>: Argument "" isn't numeric in numeric comparison (<=>) at ./sg-report-flight line 774. Fix this by replacing falseish values with 0. Bug introduced in 0e09a8b00ec6 "sg-report-flight: Report earlier, earlier step failures". Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> --- sg-report-flight | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)