[LNT] r258450 - Warn when a regression spans more than test suite version
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 21 15:28:44 PST 2016
Author: cmatthews
Date: Thu Jan 21 17:28:44 2016
New Revision: 258450
URL: http://llvm.org/viewvc/llvm-project?rev=258450&view=rev
Log:
Warn when a regression spans more than test suite version
Modified:
lnt/trunk/lnt/server/db/regression.py
lnt/trunk/lnt/server/db/rules/rule_update_fixed_regressions.py
lnt/trunk/lnt/server/ui/regression_views.py
Modified: lnt/trunk/lnt/server/db/regression.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/regression.py?rev=258450&r1=258449&r2=258450&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/regression.py (original)
+++ lnt/trunk/lnt/server/db/regression.py Thu Jan 21 17:28:44 2016
@@ -136,7 +136,7 @@ def get_cr_for_field_change(ts, field_ch
ri = RunInfo(ts, [r.id for r in runs_all], only_tests=[field_change.test_id])
cr = ri.get_comparison_result(runs.after, runs.before,
field_change.test.id, field_change.field)
- return cr, runs.after[0]
+ return cr, runs.after[0], runs_all
def get_fieldchange(ts, fc_id):
Modified: lnt/trunk/lnt/server/db/rules/rule_update_fixed_regressions.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/rules/rule_update_fixed_regressions.py?rev=258450&r1=258449&r2=258450&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/rules/rule_update_fixed_regressions.py (original)
+++ lnt/trunk/lnt/server/db/rules/rule_update_fixed_regressions.py Thu Jan 21 17:28:44 2016
@@ -11,7 +11,7 @@ def _fixed_rind(ts, rind):
fc = rind.field_change
if fc is None:
return False
- current_cr, _ = get_cr_for_field_change(ts, fc, current=True)
+ current_cr, _, _ = get_cr_for_field_change(ts, fc, current=True)
if current_cr.pct_delta < 0.01:
return True
else:
Modified: lnt/trunk/lnt/server/ui/regression_views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/regression_views.py?rev=258450&r1=258449&r2=258450&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/regression_views.py (original)
+++ lnt/trunk/lnt/server/ui/regression_views.py Thu Jan 21 17:28:44 2016
@@ -119,11 +119,11 @@ def v4_new_regressions():
form.field_changes.choices = list()
for fc in recent_fieldchange:
if fc.old_value is None:
- cr, key_run = get_cr_for_field_change(ts, fc)
+ cr, key_run, _ = get_cr_for_field_change(ts, fc)
else:
cr = PrecomputedCR(fc.old_value, fc.new_value, fc.field.bigger_is_better)
key_run = get_first_runs_of_fieldchange(ts, fc)
- current_cr, _ = get_cr_for_field_change(ts, fc, current=True)
+ current_cr, _, _ = get_cr_for_field_change(ts, fc, current=True)
crs.append(ChangeData(fc, cr, key_run, current_cr))
form.field_changes.choices.append((fc.id, 1,))
return render_template("v4_new_regressions.html",
@@ -138,7 +138,7 @@ def calc_impact(ts, fcs):
if fc == None:
continue
if fc.old_value is None:
- cr, _ = get_cr_for_field_change(ts, fc)
+ cr, _, _ = get_cr_for_field_change(ts, fc)
else:
cr = PrecomputedCR(fc.old_value, fc.new_value, fc.field.bigger_is_better)
crs.append(cr)
@@ -299,20 +299,30 @@ def v4_regression_detail(id):
crs = []
+ test_suite_versions = set()
form.field_changes.choices = list()
for regression in regression_indicators:
fc = regression.field_change
if fc is None:
continue
if fc.old_value is None:
- cr, key_run = get_cr_for_field_change(ts, fc)
+ cr, key_run, all_runs = get_cr_for_field_change(ts, fc)
else:
cr = PrecomputedCR(fc.old_value, fc.new_value, fc.field.bigger_is_better)
key_run = get_first_runs_of_fieldchange(ts, fc)
- current_cr, _ = get_cr_for_field_change(ts, fc, current=True)
+ current_cr, _, all_runs = get_cr_for_field_change(ts, fc, current=True)
crs.append(ChangeData(fc, cr, key_run, current_cr))
form.field_changes.choices.append((fc.id, 1,))
-
+ for run in all_runs:
+ ts_rev = key_run.parameters.get('test_suite_revision')
+ if ts_rev:
+ test_suite_versions.add(ts_rev)
+
+ print test_suite_versions
+ if len(test_suite_versions) > 1:
+ flash("More than one test-suite version" + str(test_suite_versions),
+ FLASH_WARNING)
+
if request.args.get('json'):
return json.dumps({u'Regression': regression_info,
u'Changes':crs},
More information about the llvm-commits
mailing list