Skip to content

Commit

Permalink
win: mkdir even when copying directory
Browse files Browse the repository at this point in the history
* also "fix" the paths in the message
* un-skip test/copies/gyptest-all.py

BUG=gyp:536

Change-Id: Id8ff7941b995c25d68d454138cd8b04940fdd82b
Reviewed-on: https://chromium-review.googlesource.com/487521
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
  • Loading branch information
refack authored and Commit Bot committed Apr 26, 2017
1 parent ffd524c commit a478c1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
13 changes: 8 additions & 5 deletions pylib/gyp/generator/msvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1717,14 +1717,17 @@ def _GetCopies(spec):
src_bare = src[:-1]
base_dir = posixpath.split(src_bare)[0]
outer_dir = posixpath.split(src_bare)[1]
cmd = 'cd "%s" && xcopy /e /f /y "%s" "%s\\%s\\"' % (
_FixPath(base_dir), outer_dir, _FixPath(dst), outer_dir)
fixed_dst = _FixPath(dst)
full_dst = '"%s\\%s\\"' % (fixed_dst, outer_dir)
cmd = 'mkdir %s 2>nul & cd "%s" && xcopy /e /f /y "%s" %s' % (
full_dst, _FixPath(base_dir), outer_dir, full_dst)
copies.append(([src], ['dummy_copies', dst], cmd,
'Copying %s to %s' % (src, dst)))
'Copying %s to %s' % (src, fixed_dst)))
else:
fix_dst = _FixPath(cpy['destination'])
cmd = 'mkdir "%s" 2>nul & set ERRORLEVEL=0 & copy /Y "%s" "%s"' % (
_FixPath(cpy['destination']), _FixPath(src), _FixPath(dst))
copies.append(([src], [dst], cmd, 'Copying %s to %s' % (src, dst)))
fix_dst, _FixPath(src), _FixPath(dst))
copies.append(([src], [dst], cmd, 'Copying %s to %s' % (src, fix_dst)))
return copies


Expand Down
5 changes: 0 additions & 5 deletions test/copies/gyptest-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@

test = TestGyp.TestGyp()

# The test seems to fail on msvs on the waterfall but not the try servers.
# Need to investigate further.
if test.format == 'msvs':
test.skip_test() # bug=536

test.run_gyp('copies.gyp',
'-G', 'xcode_ninja_target_pattern=^(?!copies_null)',
chdir='src')
Expand Down

0 comments on commit a478c1a

Please sign in to comment.