summaryrefslogtreecommitdiffstats
path: root/build/cp.py
diff options
context:
space:
mode:
authoryfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-30 01:57:11 +0000
committeryfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-30 01:57:11 +0000
commitc9ba9b8796de0802f7b941245cc41eb7d59ce7c8 (patch)
tree6e96830a8f86c92557b3b6341b0f9af1879a54d8 /build/cp.py
parent5800954a2635c503c0d74da5617ca60a13be1a6a (diff)
downloadchromium_src-c9ba9b8796de0802f7b941245cc41eb7d59ce7c8.zip
chromium_src-c9ba9b8796de0802f7b941245cc41eb7d59ce7c8.tar.gz
chromium_src-c9ba9b8796de0802f7b941245cc41eb7d59ce7c8.tar.bz2
Normalize output path to cp.py
The js unit test targets have subtle dependencies on sources. Specifically, a rule pulls in js files and generates/runs js tests for them. This can be an issue with a relative path when the commands are run in parallel because a relative path may not exist. In this case, the rule for cr.js which is in ui depends on chrome. An easy way to repro this failure is: $ ninja -C out/Debug unit_tests $ rm -rf out/Debug/test_data $ ninja -C out/Debug test_data/chrome/../ui/webui/resources/js/cr.js Ninja is fine because it normalizes the path early enough whereas in python we relied on the system to compute the path but out/Debug/test_data/chrome may not exist BUG=235731 Hat-tip to cjhopman for help debugging. Review URL: https://chromiumcodereview.appspot.com/14432003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197224 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/cp.py')
-rwxr-xr-xbuild/cp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/build/cp.py b/build/cp.py
index dd98e1d..0f32536 100755
--- a/build/cp.py
+++ b/build/cp.py
@@ -9,13 +9,14 @@ This module works much like the cp posix command - it takes 2 arguments:
(src, dst) and copies the file with path |src| to |dst|.
"""
+import os
import shutil
import sys
def Main(src, dst):
# Use copy instead of copyfile to ensure the executable bit is copied.
- return shutil.copy(src, dst)
+ return shutil.copy(src, os.path.normpath(dst))
if __name__ == '__main__':