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

Unified Diff: tools/isolate/isolate_smoke_test.py

Issue 10080013: Makes the code simpler by automatically deducing the root directory to use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Now completely working on windows Created 8 years, 8 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/isolate.py ('k') | tools/isolate/isolate_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/isolate/isolate_smoke_test.py
diff --git a/tools/isolate/isolate_smoke_test.py b/tools/isolate/isolate_smoke_test.py
index 33d7f7b4f1b1c8112d2edb60666f7d659a28b09e..f5ba246cb623bb442a15bd9cfe6a74cca07fef98 100755
--- a/tools/isolate/isolate_smoke_test.py
+++ b/tools/isolate/isolate_smoke_test.py
@@ -119,13 +119,21 @@ class IsolateBase(unittest.TestCase):
files[filename][u'sha-1'] = unicode(h.hexdigest())
return files
- def _expected_result(self, args, read_only):
+ def _expected_result(self, args, read_only, extra_vars=None):
"""Verifies self.result contains the expected data."""
+ flavor = isolate.trace_inputs.get_flavor()
expected = {
u'files': self._gen_files(read_only),
- u'relative_cwd': unicode(RELATIVE_CWD[self.case()]),
u'read_only': read_only,
+ u'relative_cwd': unicode(RELATIVE_CWD[self.case()]),
+ u'resultdir': os.path.dirname(self.result),
+ u'resultfile': self.result,
+ u'variables': {
+ u'EXECUTABLE_SUFFIX': '.exe' if flavor == 'win' else '',
+ u'OS': unicode(flavor),
+ },
}
+ expected['variables'].update(extra_vars or {})
if args:
expected[u'command'] = [u'python'] + [unicode(x) for x in args]
else:
@@ -272,7 +280,7 @@ class Isolate_check(IsolateBase):
def test_with_flag(self):
self._execute('check', 'with_flag.isolate', ['-V', 'FLAG', 'gyp'], False)
self._expect_no_tree()
- self._expected_result(['with_flag.py', 'gyp'], None)
+ self._expected_result(['with_flag.py', 'gyp'], None, {u'FLAG': u'gyp'})
class Isolate_hashtable(IsolateBase):
@@ -320,7 +328,7 @@ class Isolate_hashtable(IsolateBase):
self._execute(
'hashtable', 'with_flag.isolate', ['-V', 'FLAG', 'gyp'], False)
self._expected_hash_tree()
- self._expected_result(['with_flag.py', 'gyp'], None)
+ self._expected_result(['with_flag.py', 'gyp'], None, {u'FLAG': u'gyp'})
class Isolate_remap(IsolateBase):
@@ -362,7 +370,7 @@ class Isolate_remap(IsolateBase):
def test_with_flag(self):
self._execute('remap', 'with_flag.isolate', ['-V', 'FLAG', 'gyp'], False)
self._expected_tree()
- self._expected_result(['with_flag.py', 'gyp'], None)
+ self._expected_result(['with_flag.py', 'gyp'], None, {u'FLAG': u'gyp'})
class Isolate_run(IsolateBase):
@@ -416,7 +424,7 @@ class Isolate_run(IsolateBase):
self._execute('run', 'with_flag.isolate', ['-V', 'FLAG', 'run'], False)
# Not sure about the empty tree, should be deleted.
self._expect_empty_tree()
- self._expected_result(['with_flag.py', 'run'], None)
+ self._expected_result(['with_flag.py', 'run'], None, {u'FLAG': u'run'})
class Isolate_trace(IsolateBase):
@@ -496,7 +504,7 @@ class Isolate_trace(IsolateBase):
out = self._execute(
'trace', 'with_flag.isolate', ['-V', 'FLAG', 'trace'], True)
self._expect_no_tree()
- self._expected_result(['with_flag.py', 'trace'], None)
+ self._expected_result(['with_flag.py', 'trace'], None, {u'FLAG': u'trace'})
expected = {
'conditions': [
['OS=="%s"' % isolate.trace_inputs.get_flavor(), {
« no previous file with comments | « tools/isolate/isolate.py ('k') | tools/isolate/isolate_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698