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

Unified Diff: tools/cygprofile/patch_orderfile_unittest.py

Issue 859303005: Only include unique lines when patching orderfile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from pasko Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/cygprofile/patch_orderfile.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cygprofile/patch_orderfile_unittest.py
diff --git a/tools/cygprofile/patch_orderfile_unittest.py b/tools/cygprofile/patch_orderfile_unittest.py
index b88dcafc38380069b47f44881500003a10dddb9b..7066e2eebf729c1b7bb121a50482d0bf9b7f5772 100755
--- a/tools/cygprofile/patch_orderfile_unittest.py
+++ b/tools/cygprofile/patch_orderfile_unittest.py
@@ -66,7 +66,10 @@ class TestPatchOrderFile(unittest.TestCase):
def testGetSymbolsFromStream(self):
lines = [".text.startup.",
".text.with.a.prefix",
- "_ZN2v88internal33HEnvironmentLivenessAnalysisPhase3RunEv"]
+ "",
+ "_ZN2v88internal33HEnvironmentLivenessAnalysisPhase3RunEv",
+ ".text",
+ ".text.*"]
names = patch_orderfile._GetSymbolsFromStream(lines)
self.assertEquals(len(names), 2)
self.assertEquals(
@@ -101,9 +104,9 @@ class TestPatchOrderFile(unittest.TestCase):
def testPrintSymbolWithPrefixes(self):
class FakeOutputFile(object):
def __init__(self):
- self.output = []
+ self.output = ''
def write(self, s):
- self.output.append(s)
+ self.output = self.output + s
test_symbol = "dummySymbol"
symbol_names = [test_symbol]
fake_output = FakeOutputFile()
@@ -113,7 +116,7 @@ class TestPatchOrderFile(unittest.TestCase):
.text.unlikely.dummySymbol
.text.dummySymbol
"""
- self.assertEquals("\n".join(fake_output.output), expected_output)
+ self.assertEquals(fake_output.output, expected_output)
if __name__ == "__main__":
« no previous file with comments | « tools/cygprofile/patch_orderfile.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698