[PATCH] D42894: Use session saved baseline in run comparison report
Siddhesh Poyarekar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 4 11:41:39 PST 2018
siddhesh created this revision.
Herald added a subscriber: llvm-commits.
The run comparison report only uses the GET key 'baseline' as a parameter to set the baseline for runs and does not use the baseline set in the session by selecting one of the "Baselines" menu options. Recognize the session saved baseline and use it if there is no 'baseline' GET variable.
Repository:
rL LLVM
https://reviews.llvm.org/D42894
Files:
lnt/server/ui/views.py
Index: lnt/server/ui/views.py
===================================================================
--- lnt/server/ui/views.py
+++ lnt/server/ui/views.py
@@ -397,12 +397,13 @@
baseline_str = request.args.get('baseline')
if baseline_str:
baseline_id = int(baseline_str)
- baseline = session.query(ts.Run).filter_by(id=baseline_id).first()
- if baseline is None:
- flash("Could not find baseline " + baseline_str, FLASH_DANGER)
else:
- baseline = None
+ baseline_id = flask.session.get(baseline_key())
+ baseline = session.query(ts.Run).filter_by(id=baseline_id).first()
+ if baseline is None and baseline_str:
+ flash("Could not find baseline " + baseline_str, FLASH_DANGER)
+
# Gather the runs to use for statistical data.
comparison_start_run = compare_to or self.run
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42894.132776.patch
Type: text/x-patch
Size: 913 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180204/ff70a1d3/attachment.bin>
More information about the llvm-commits
mailing list