OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 unittest | 5 import unittest |
6 | 6 |
7 import mock | 7 import mock |
8 | 8 |
9 from google.appengine.ext import ndb | 9 from google.appengine.ext import ndb |
10 from google.appengine.ext import testbed | 10 from google.appengine.ext import testbed |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 class IsolateLookupTest(_FindIsolateTest): | 59 class IsolateLookupTest(_FindIsolateTest): |
60 | 60 |
61 def testIsolateLookupSuccess(self): | 61 def testIsolateLookupSuccess(self): |
62 change = change_module.Change(change_module.Dep('src', 'f9f2b720')) | 62 change = change_module.Change(change_module.Dep('src', 'f9f2b720')) |
63 quest = find_isolate.FindIsolate('Mac Pro Perf', 'telemetry_perf_tests') | 63 quest = find_isolate.FindIsolate('Mac Pro Perf', 'telemetry_perf_tests') |
64 execution = quest.Start(change) | 64 execution = quest.Start(change) |
65 execution.Poll() | 65 execution.Poll() |
66 | 66 |
67 self.assertExecutionSuccess(execution) | 67 self.assertExecutionSuccess(execution) |
68 self.assertEqual(execution.result_arguments, {'isolate_hash': '7c7e90be'}) | 68 self.assertEqual(execution.result_arguments, {'isolate_hash': '7c7e90be'}) |
| 69 self.assertEqual( |
| 70 { |
| 71 'build': None, |
| 72 'result_arguments': {'isolate_hash': u'7c7e90be'}, |
| 73 'result_values': (None,) |
| 74 }, |
| 75 execution.AsDict()) |
69 | 76 |
70 | 77 |
71 class BuilderLookupTest(_FindIsolateTest): | 78 class BuilderLookupTest(_FindIsolateTest): |
72 | 79 |
73 def testSuccesfulBuilderLookupForAllBuilders(self): | 80 def testSuccesfulBuilderLookupForAllBuilders(self): |
74 builder_testers = ( | 81 builder_testers = ( |
75 ('arm-builder-rel', 'health-plan-clankium-phone'), | 82 ('arm-builder-rel', 'health-plan-clankium-phone'), |
76 ('Android Builder', 'Android Nexus5 Perf'), | 83 ('Android Builder', 'Android Nexus5 Perf'), |
77 ('Android arm64 Builder', 'Android Nexus5X Perf'), | 84 ('Android arm64 Builder', 'Android Nexus5X Perf'), |
78 ('Linux Builder', 'Linux Perf'), | 85 ('Linux Builder', 'Linux Perf'), |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 # Check build status. | 216 # Check build status. |
210 get_job_status.return_value = { | 217 get_job_status.return_value = { |
211 'build': { | 218 'build': { |
212 'status': 'COMPLETED', | 219 'status': 'COMPLETED', |
213 'result': 'SUCCESS', | 220 'result': 'SUCCESS', |
214 } | 221 } |
215 } | 222 } |
216 execution.Poll() | 223 execution.Poll() |
217 | 224 |
218 self.assertExecutionFailure(execution, find_isolate.BuildError) | 225 self.assertExecutionFailure(execution, find_isolate.BuildError) |
OLD | NEW |