Android requires shared library support in sancov, Mike has been working on it very recently. The version of sancov in the current chromium toolchain most likely does not work for android.
Owner: aizatsky@chromium.org Summary: Deprecate objdump in favor for sancov tool for coverage, add support for Windows, Mac, Android (was: Deprecate objdump in favor for sancov tool for coverage, add support for Windows, Mac)
Mike, i am keeping this assigned to you till Android CL lands, can you add a link ?
Looks like it had broken LKGR builds:
Traceback (most recent call last):
File "/tmp/tmp8B0w1e.py", line 4, in <module>
shutil.copy(sys.argv[1], sys.argv[2])
File "/usr/lib/python2.7/shutil.py", line 117, in copy
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 69, in copyfile
raise Error("`%s` and `%s` are the same file" % (src, dst))
shutil.Error: `/b/c/b/ASAN_Release/src/third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer` and `/b/c/b/ASAN_Release/src/out/Release/llvm-symbolizer` are the same file
step returned non-zero exit code: 1
@@@STEP_FAILURE@@@
Though I don't understand why this error happens:
we do:
for tool in llvm_tools_to_copy:
self.m.file.copy('Copy ' + tool,
self.m.path.join(llvm_bin_dir, tool + ext), build_dir)
which is:
def copy(self, name, source, dest, step_test_data=None, **kwargs):
"""Copy a file."""
return self.m.python.inline(
name,
"""
import shutil
import sys
shutil.copy(sys.argv[1], sys.argv[2])
""",
args=[source, dest],
add_python_log=False,
step_test_data=step_test_data,
**kwargs
)
and shutil.copy says that it overwrites files by default:
shutil.copy(src, dst) - https://docs.python.org/2/library/shutil.html :
Copy the file src to the file or directory dst. If dst is a directory, a file with the same basename as src is created (or overwritten) in the directory specified. Permission bits are copied. src and dst are path names given as strings.
Shutil source:
def _samefile(src, dst):
# Macintosh, Unix.
if hasattr(os.path, 'samefile'):
try:
return os.path.samefile(src, dst)
except OSError:
return False
# All other platforms: check for same pathname.
return (os.path.normcase(os.path.abspath(src)) ≡
os.path.normcase(os.path.abspath(dst)))
def copyfile(src, dst):
"""Copy data from src to dst"""
if _samefile(src, dst):
raise Error("`%s` and `%s` are the same file" % (src, dst))
...
But why? :(
Anyways, fix: https://codereview.chromium.org/2400963002/#ps1
tl;dr shutil is doing things right, I was wrong.
_samefile is not actually stupid - it checks that src and dst point to the same actual inode (ie symlink or hardlink). Thus, something is wrong with either
a) chromium recipe
b) output folder is a symlink of another output folder.
Thanks tandrii@
While revert CL was without LGTM, I tried to do something like this: https://codereview.chromium.org/2399353002/
but got an error from `scripts/slave/unittests/recipe_simulation_test.py train`.
Asked infra-dev@ about that.
c#15 is for PS#2 of the https://codereview.chromium.org/2399353002/#ps20001
The last patchset seems to be working, though I'm not sure if it's safe to run on the bots. It is just a suggestion how to fix the problem.
Comment 1 by euge...@chromium.org
, Aug 10 2016