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

Unified Diff: tools/isolate/trace_inputs_test.py

Issue 9835084: Implementing stateful directory tracking for dtrace on OSX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase against http://codereview.chromium.org/9834052 Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/isolate/trace_inputs.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/isolate/trace_inputs_test.py
diff --git a/tools/isolate/trace_inputs_test.py b/tools/isolate/trace_inputs_test.py
index e1c391f2017096c35dc693edbab2b3f3ed17e726..77c6bdc6bd86fb55b03dd8c99b28ec628c9a349b 100755
--- a/tools/isolate/trace_inputs_test.py
+++ b/tools/isolate/trace_inputs_test.py
@@ -58,20 +58,9 @@ class TraceInputs(unittest.TestCase):
]
def test_trace(self):
- if sys.platform == 'linux2':
- return self._test_trace_linux()
- if sys.platform == 'darwin':
- return self._test_trace_mac()
- print 'Unsupported: %s' % sys.platform
-
- def test_trace_gyp(self):
- if sys.platform == 'linux2':
- return self._test_trace_gyp_linux()
- if sys.platform == 'darwin':
- return self._test_trace_gyp_mac()
- print 'Unsupported: %s' % sys.platform
-
- def _test_trace_linux(self):
+ if sys.platform not in ('linux2', 'darwin'):
+ print 'WARNING: unsupported: %s' % sys.platform
+ return
expected_end = [
"Interesting: 4 reduced to 3",
" data/trace_inputs/",
@@ -88,7 +77,10 @@ class TraceInputs(unittest.TestCase):
# virtualenv usage.
self.assertEquals(expected_end, actual[-len(expected_end):])
- def _test_trace_gyp_linux(self):
+ def test_trace_gyp(self):
+ if sys.platform not in ('linux2', 'darwin'):
+ print 'WARNING: unsupported: %s' % sys.platform
+ return
expected = (
"{\n"
" 'variables': {\n"
@@ -104,38 +96,6 @@ class TraceInputs(unittest.TestCase):
actual = self._execute(self._gyp() + ['trace_inputs_test.py', '--child1'])
self.assertEquals(expected, actual)
- def _test_trace_mac(self):
- # It is annoying in the case of dtrace because it requires root access.
- # TODO(maruel): BUG: Note that child.py is missing.
- expected = (
- "Total: 2\n"
- "Non existent: 0\n"
- "Interesting: 2 reduced to 2\n"
- " trace_inputs.py\n"
- " trace_inputs_test.py\n")
- actual = self._execute(
- ['trace_inputs_test.py', '--child1']).splitlines(True)
- self.assertTrue(actual[0].startswith('Tracing... ['))
- self.assertTrue(actual[1].startswith('Loading traces... '))
- self.assertEquals(expected, ''.join(actual[2:]))
-
- def _test_trace_gyp_mac(self):
- # It is annoying in the case of dtrace because it requires root access.
- # TODO(maruel): BUG: Note that child.py is missing.
- expected = (
- "{\n"
- " 'variables': {\n"
- " 'isolate_files': [\n"
- " '<(DEPTH)/trace_inputs.py',\n"
- " '<(DEPTH)/trace_inputs_test.py',\n"
- " ],\n"
- " 'isolate_dirs': [\n"
- " ],\n"
- " },\n"
- "},\n")
- actual = self._execute(self._gyp() + ['trace_inputs_test.py', '--child1'])
- self.assertEquals(expected, actual)
-
def child1():
print 'child1'
« no previous file with comments | « tools/isolate/trace_inputs.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698