Index: lnt/trunk/lnt/server/reporting/analysis.py =================================================================== --- lnt/trunk/lnt/server/reporting/analysis.py +++ lnt/trunk/lnt/server/reporting/analysis.py @@ -368,11 +368,12 @@ return r def get_geomean_comparison_result(self, run, compare_to, field, tests): - if tests: + unchanged_tests = [(cr.previous, cr.current, cr.prev_hash, cr.cur_hash) + for _, _, cr in tests + if cr.get_test_status() == UNCHANGED_PASS] + if unchanged_tests: prev_values, run_values, prev_hash, cur_hash = zip( - *[(cr.previous, cr.current, cr.prev_hash, cr.cur_hash) - for _, _, cr in tests - if cr.get_test_status() == UNCHANGED_PASS]) + *unchanged_tests) prev_values = [x for x in prev_values if x is not None] run_values = [x for x in run_values if x is not None] prev_hash = [x for x in prev_hash if x is not None] Index: lnt/trunk/tests/server/ui/V4Pages.py =================================================================== --- lnt/trunk/tests/server/ui/V4Pages.py +++ lnt/trunk/tests/server/ui/V4Pages.py @@ -11,6 +11,9 @@ # Import a profile # RUN: lnt import %t.instance %{shared_inputs}/profile-report.json # +# RUN: lnt import %t.instance %S/Inputs/sample-failed-report1.json +# RUN: lnt import %t.instance %S/Inputs/sample-failed-report2.json +# # RUN: python %s %t.instance %{tidylib} import logging @@ -657,6 +660,10 @@ check_code(client, '/db_default/v4/nts/graph_for_sample/10/not_a_metric?foo=bar', expected_code=HTTP_BAD_REQUEST) + # check get_geomean_comparison_result with empty unchanged_tests + check_html(client, '/v4/nts/11') + check_html(client, '/v4/nts/12') + if __name__ == '__main__': main()