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

Side by Side Diff: telemetry/telemetry/internal/story_runner_unittest.py

Issue 2903023002: [Telemetry] Do not have benchmarks validate story name in expectations during runs. (Closed)
Patch Set: [Telemetry] Do not have benchmarks validate story name in expectations during runs. Created 3 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 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 json 5 import json
6 import math 6 import math
7 import os 7 import os
8 import shutil 8 import shutil
9 import StringIO 9 import StringIO
10 import sys 10 import sys
(...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 shutil.rmtree(tmp_path) 1217 shutil.rmtree(tmp_path)
1218 1218
1219 def testRunBenchmarkDisabledStoryWithBadName(self): 1219 def testRunBenchmarkDisabledStoryWithBadName(self):
1220 fake_benchmark = FakeBenchmark() 1220 fake_benchmark = FakeBenchmark()
1221 fake_benchmark.story_disabled = True 1221 fake_benchmark.story_disabled = True
1222 options = self._GenerateBaseBrowserFinderOptions() 1222 options = self._GenerateBaseBrowserFinderOptions()
1223 tmp_path = tempfile.mkdtemp() 1223 tmp_path = tempfile.mkdtemp()
1224 try: 1224 try:
1225 options.output_dir = tmp_path 1225 options.output_dir = tmp_path
1226 rc = story_runner.RunBenchmark(fake_benchmark, options) 1226 rc = story_runner.RunBenchmark(fake_benchmark, options)
1227 # The exception from not having a matching name is caught and the return 1227 # Test should return 0 since only error messages are logged.
1228 # code is set to a failure code. 1228 self.assertEqual(rc, 0)
1229 self.assertEqual(rc, 255)
1230 finally: 1229 finally:
1231 shutil.rmtree(tmp_path) 1230 shutil.rmtree(tmp_path)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698