summaryrefslogtreecommitdiffstats
path: root/build/cp.py
diff options
context:
space:
mode:
authorscr@chromium.org <scr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-09 21:55:09 +0000
committerscr@chromium.org <scr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-09 21:55:09 +0000
commite010983a890901bb8dfdc5fc19043dd5faf7a330 (patch)
tree933cc0ba796fbec00b8f38e1af208f0cb998bfb4 /build/cp.py
parent698415277ea798691a713c39c43af91a3d7a0dfc (diff)
downloadchromium_src-e010983a890901bb8dfdc5fc19043dd5faf7a330.zip
chromium_src-e010983a890901bb8dfdc5fc19043dd5faf7a330.tar.gz
chromium_src-e010983a890901bb8dfdc5fc19043dd5faf7a330.tar.bz2
Make it possible to include another file and port print_preview unit test to unit_tests.
Print Preview unit_tests were good to tackle because it brought in a dependency on the need to include another js file. This also hilighted another need - that of being able to include non-generative js files in gyp and have them copied to the test_data dir, while doing both generation and copy for gtest files. I changed the "extension" of files which generate C++ with gtest-like syntax to .gtestjs and added a copyjs rule to the chrome_tests.gypi. FWIW, I believe this is mostly needed for unit_tests and only applied it there, although I would be amenable to also making this change for the webui tests to make it clear that they are not plain js files. R=dpapad@chromium.org BUG=101443,102222 TEST=unit_tests --gtest_filter=PrintPreviewUtilsUnitTest.* Review URL: http://codereview.chromium.org/8438063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109310 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/cp.py')
-rw-r--r--build/cp.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/build/cp.py b/build/cp.py
new file mode 100644
index 0000000..7dfeb38
--- /dev/null
+++ b/build/cp.py
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+# Copyright (c) 2011 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 shutil, sys;
+
+""" Copy File.
+
+This module works much like the cp posix command - it takes 2 arguments:
+(src, dst) and copies the file with path |src| to |dst|.
+"""
+
+def Main(src, dst):
+ return shutil.copyfile(src, dst)
+
+if __name__ == '__main__':
+ sys.exit(Main(sys.argv[1], sys.argv[2]))