summaryrefslogtreecommitdiffstats
path: root/tools/isolate/isolate_test.py
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-12 01:59:29 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-12 01:59:29 +0000
commit256f4bd66fd000e2414495fc12c8d7a6152ab003 (patch)
tree6a3454007015206edfd69f58e2fa3491c1fa0f73 /tools/isolate/isolate_test.py
parent5793906a89da44f153d3ec999544653fae5e58e1 (diff)
downloadchromium_src-256f4bd66fd000e2414495fc12c8d7a6152ab003.zip
chromium_src-256f4bd66fd000e2414495fc12c8d7a6152ab003.tar.gz
chromium_src-256f4bd66fd000e2414495fc12c8d7a6152ab003.tar.bz2
Convert isolate.py to exclusively use .isolate files.
Convert base_unittests_run and net_unittests_run to use the new format. Rename isolate_files to isolate_dependency_tracked and ..._dirs to ..._untracked. Rewrite merge_isolate.py to have fully deterministic and sane behavior, especially for 'else' conditions. Convert 'python' to sys.executable when running the command. Add a lot of unit tests. Move hashtable default directory into dirname(result) + '/hashtable'. R=rogerta@chromium.org R=mark@chromium.org R=rsleevi@chromium.org BUG=98834 TEST= Review URL: http://codereview.chromium.org/10019014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131896 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/isolate/isolate_test.py')
-rwxr-xr-xtools/isolate/isolate_test.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/isolate/isolate_test.py b/tools/isolate/isolate_test.py
new file mode 100755
index 0000000..3e5eac9
--- /dev/null
+++ b/tools/isolate/isolate_test.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import unittest
+
+import isolate
+
+
+class Isolate(unittest.TestCase):
+ def test_load_empty(self):
+ content = "{}"
+ variables = {}
+ command, infiles, read_only = isolate.load_isolate(
+ content, variables, self.fail)
+ self.assertEquals([], command)
+ self.assertEquals([], infiles)
+ self.assertEquals(None, read_only)
+
+
+if __name__ == '__main__':
+ unittest.main()