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

Side by Side Diff: appengine/findit/waterfall/test/failure_signal_test.py

Issue 1933013003: [Findit] Extract failed output nodes from stdio log of compile step. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Address comments. Created 4 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 unittest 5 import unittest
6 6
7 from waterfall.failure_signal import FailureSignal 7 from waterfall.failure_signal import FailureSignal
8 8
9 9
10 class FailureSignalTest(unittest.TestCase): 10 class FailureSignalTest(unittest.TestCase):
(...skipping 29 matching lines...) Expand all
40 signal.failed_targets) 40 signal.failed_targets)
41 41
42 def testToFromDict(self): 42 def testToFromDict(self):
43 data = { 43 data = {
44 'files': { 44 'files': {
45 'a.cc': [2], 45 'a.cc': [2],
46 'd.cc': [] 46 'd.cc': []
47 }, 47 },
48 'keywords': { 48 'keywords': {
49 'k1': 3 49 'k1': 3
50 } 50 },
51 'failed_output_nodes': [
52 'obj/path/to/file.o',
53 ],
51 } 54 }
52 signal = FailureSignal.FromDict(data) 55 signal = FailureSignal.FromDict(data)
53 self.assertEqual(data, signal.ToDict()) 56 self.assertEqual(data, signal.ToDict())
54 57
55 def testToFromDictWithFailedTargets(self): 58 def testToFromDictWithFailedTargets(self):
56 data = { 59 data = {
57 'files': { 60 'files': {
58 'a.cc': [2], 61 'a.cc': [2],
59 'd.cc': [] 62 'd.cc': []
60 }, 63 },
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 'target': 'b.o', 130 'target': 'b.o',
128 'source': 'b.cc' 131 'source': 'b.cc'
129 }, 132 },
130 { 133 {
131 'target': 'c.exe' 134 'target': 'c.exe'
132 } 135 }
133 ] 136 ]
134 137
135 self.assertEqual(expected_step_signal_files, step_signal.files) 138 self.assertEqual(expected_step_signal_files, step_signal.files)
136 self.assertEqual(expected_step_failed_targets, step_signal.failed_targets) 139 self.assertEqual(expected_step_failed_targets, step_signal.failed_targets)
OLDNEW
« no previous file with comments | « appengine/findit/waterfall/test/extractors_test.py ('k') | appengine/findit/waterfall/test/try_job_util_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698