[LNT] r255955 - Fix test case that won't work until change is committed

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 17:22:16 PST 2015


Author: cmatthews
Date: Thu Dec 17 19:22:15 2015
New Revision: 255955

URL: http://llvm.org/viewvc/llvm-project?rev=255955&view=rev
Log:
Fix test case that won't work until change is committed

Modified:
    lnt/trunk/lnt/server/db/fieldchange.py

Modified: lnt/trunk/lnt/server/db/fieldchange.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/fieldchange.py?rev=255955&r1=255954&r2=255955&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/fieldchange.py (original)
+++ lnt/trunk/lnt/server/db/fieldchange.py Thu Dec 17 19:22:15 2015
@@ -73,20 +73,19 @@ def regenerate_fieldchanges_for_run(ts,
                 continue
 
             if result.is_result_performance_change() and not f:
-
+                test = ts.query(ts.Test).filter(ts.Test.id == test_id).one()
                 f = ts.FieldChange(start_order=start_order,
                                    end_order=run.order,
                                    machine=run.machine,
-                                   test=None,
+                                   test=test,
                                    field=field)
-                f.test_id = test_id
                 ts.add(f)
                 ts.commit()
                 found, new_reg = identify_related_changes(ts, regressions, f)
                 if found:
                     regressions.append(new_reg)
                 note("Found field change: {}".format(run.machine))
-                
+
             # Always update FCs with new values.
             if f:
                 f.old_value = result.previous




More information about the llvm-commits mailing list