Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(550)

Side by Side Diff: perf_insights/perf_insights_build/pi_report_to_html_unittest.py

Issue 1772833002: Remove SystemHealthMetric (fka RAILScore) (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: fix pi test Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import codecs 5 import codecs
6 import os 6 import os
7 import tempfile 7 import tempfile
8 import unittest 8 import unittest
9 9
10 from perf_insights import corpus_driver_cmdline 10 from perf_insights import corpus_driver_cmdline
(...skipping 18 matching lines...) Expand all
29 mode='w', suffix='.html', delete=False) 29 mode='w', suffix='.html', delete=False)
30 raw_tmpfile.close() 30 raw_tmpfile.close()
31 try: 31 try:
32 project = perf_insights_project.PerfInsightsProject() 32 project = perf_insights_project.PerfInsightsProject()
33 with codecs.open(raw_tmpfile.name, 'w', encoding='utf-8') as tmpfile: 33 with codecs.open(raw_tmpfile.name, 'w', encoding='utf-8') as tmpfile:
34 corpus_driver = corpus_driver_cmdline.GetCorpusDriver( 34 corpus_driver = corpus_driver_cmdline.GetCorpusDriver(
35 None, TestArgs(project.perf_insights_test_data_path)) 35 None, TestArgs(project.perf_insights_test_data_path))
36 res = pi_report_to_html.PiReportToHTML( 36 res = pi_report_to_html.PiReportToHTML(
37 tmpfile, corpus_driver, 37 tmpfile, corpus_driver,
38 project.GetAbsPathFromHRef( 38 project.GetAbsPathFromHRef(
39 '/perf_insights/ui/reports/weather_report.html'), 39 '/perf_insights/ui/reports/startup_report.html'),
40 corpus_query.CorpusQuery.FromString('MAX_TRACE_HANDLES=2'), 40 corpus_query.CorpusQuery.FromString('MAX_TRACE_HANDLES=2'),
41 quiet=True) 41 quiet=True)
42 self.assertEquals(res, 0) 42 self.assertEquals(res, 0)
43 finally: 43 finally:
44 os.remove(raw_tmpfile.name) 44 os.remove(raw_tmpfile.name)
OLDNEW
« no previous file with comments | « perf_insights/perf_insights/ui/reports/weather_report_test.html ('k') | tracing/trace_viewer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698