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

Unified Diff: tools/isolate/tests/isolate/with_flag.py

Issue 11045023: Move src/tools/isolate to src/tools/swarm_client as a DEPS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use r159961 Created 8 years, 2 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/tests/isolate/with_flag.isolate ('k') | tools/isolate/tests/isolate_smoke_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/isolate/tests/isolate/with_flag.py
diff --git a/tools/isolate/tests/isolate/with_flag.py b/tools/isolate/tests/isolate/with_flag.py
deleted file mode 100755
index 695f98c68367b625fad847979452b257ac8f7324..0000000000000000000000000000000000000000
--- a/tools/isolate/tests/isolate/with_flag.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/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 os
-import sys
-
-
-def main():
- print 'with_flag: Verify the test data files were mapped properly'
- assert len(sys.argv) == 2
- mode = sys.argv[1]
- assert mode in ('run', 'trace')
- expected = {
- os.path.join('subdir', '42.txt'):
- 'the answer to life the universe and everything\n',
- 'test_file1.txt': 'Foo\n',
- 'test_file2.txt': 'Bar\n',
- }
-
- root = 'files1'
- actual = {}
- for relroot, dirnames, filenames in os.walk(root):
- for filename in filenames:
- fullpath = os.path.join(relroot, filename)
- actual[fullpath[len(root)+1:]] = open(fullpath, 'rb').read()
- if mode == 'trace' and '.svn' in dirnames:
- dirnames.remove('.svn')
-
- if actual != expected:
- print 'Failure'
- print actual
- print expected
- return 1
-
- root_dir = os.path.dirname(os.path.abspath(__file__))
- parent_dir, base = os.path.split(root_dir)
- if mode == 'trace':
- # Verify the parent directory.
- parent_dir, base2 = os.path.split(parent_dir)
- if base != 'isolate' or base2 != 'tests':
- print 'mode trace: Invalid root dir %s' % root_dir
- return 4
- else:
- # Verify that we are not inside a checkout.
- if base == 'tests':
- print 'mode run: Invalid root dir %s' % root_dir
- return 5
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())
« no previous file with comments | « tools/isolate/tests/isolate/with_flag.isolate ('k') | tools/isolate/tests/isolate_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698