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

Unified Diff: tools/isolate/data/run_test_from_archive/check_files.py

Issue 10876044: run_test_from_archive: Rewritten to be more parallelized. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase againt HEAD and include fixes Created 8 years, 4 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 | « no previous file | tools/isolate/data/run_test_from_archive/check_files.results » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/isolate/data/run_test_from_archive/check_files.py
diff --git a/tools/isolate/data/run_test_from_archive/check_files.py b/tools/isolate/data/run_test_from_archive/check_files.py
new file mode 100755
index 0000000000000000000000000000000000000000..cd429ef0b93061184c18f683d508579b854d9eaa
--- /dev/null
+++ b/tools/isolate/data/run_test_from_archive/check_files.py
@@ -0,0 +1,39 @@
+#!/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.
+
+"""Checks all the expected files are mapped."""
+
+import os
+import sys
+
+ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
+
+
+def main():
+ expected = sorted([
+ 'check_files.py',
+ 'gtest_fake.py',
+ 'file1.txt',
+ 'file2.txt',
+ ])
+ actual = sorted(os.listdir(ROOT_DIR))
+ if expected != actual:
+ print >> sys.stderr, 'Expected list doesn\'t match:'
+ print >> sys.stderr, ', '.join(expected)
+ print >> sys.stderr, ', '.join(actual)
+ return 1
+
+ # Check that file2.txt is in reality file3.txt.
+ with open(os.path.join(ROOT_DIR, 'file2.txt'), 'rb') as f:
+ if f.read() != 'File3\n':
+ print >> sys.stderr, 'file2.txt should be file3.txt in reality'
+ return 2
+
+ print 'Success'
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())
« no previous file with comments | « no previous file | tools/isolate/data/run_test_from_archive/check_files.results » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698