diff options
author | yfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 23:04:47 +0000 |
---|---|---|
committer | yfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 23:04:47 +0000 |
commit | 9e41978254f491afbc2daaed0c42d67c8e8163e2 (patch) | |
tree | c729d46bd02be6ab290b83d9f4121bb96e67ea0d | |
parent | 06a700f053898b0eda868aba372d48d3b5ad1514 (diff) | |
download | chromium_src-9e41978254f491afbc2daaed0c42d67c8e8163e2.zip chromium_src-9e41978254f491afbc2daaed0c42d67c8e8163e2.tar.gz chromium_src-9e41978254f491afbc2daaed0c42d67c8e8163e2.tar.bz2 |
Merge 197224 "Normalize output path to cp.py"
> 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
TBR=yfriedman@chromium.org
Review URL: https://codereview.chromium.org/15025004
git-svn-id: svn://svn.chromium.org/chrome/branches/1453/src@199039 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-x | build/cp.py | 3 |
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__': |