Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3788)

Unified Diff: build_tools/install_gtest/install_gtest.py

Issue 6635045: Updates to make install_third_party build gtest and gmock on windows. Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build_tools/generate_windows_installer.py ('k') | build_tools/install_gtest/nacl-gmock-1.5.0.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_tools/install_gtest/install_gtest.py
===================================================================
--- build_tools/install_gtest/install_gtest.py (revision 760)
+++ build_tools/install_gtest/install_gtest.py (working copy)
@@ -73,14 +73,22 @@
def PatchAll(options):
def Patch(abs_path, patch_file):
print "Patching %s with: %s" % (abs_path, patch_file)
- p = subprocess.Popen('chmod -R a+w . && patch -p0 < %s' % (patch_file),
+ command = ''
+ if (sys.platform == 'win32'):
+ command = 'patch -p0 < %s' % (patch_file)
+ else:
+ command = 'chmod -R a+w . && patch -p0 < %s' % (patch_file)
+ p = subprocess.Popen(command,
cwd=abs_path,
env=options.shell_env,
shell=True)
assert p.wait() == 0
- Patch(options.working_dir, os.path.join(options.script_dir, GTEST_PATCH_FILE))
- Patch(options.working_dir, os.path.join(options.script_dir, GMOCK_PATCH_FILE))
+ patch_path = os.path.join(options.script_dir, GTEST_PATCH_FILE)
+ print 'about to patch with working_dir %s, patch: %s' % (options.working_dir,
+ patch_path)
+ Patch(options.working_dir, patch_path)
+ Patch(options.working_dir, patch_path)
# Build GTest and GMock, then install them into the toolchain. Note that
@@ -186,15 +194,22 @@
# extracts GTest and GMock, patches and builds them both, then installs them
# into the toolchain specified in |options.toolchain|.
def InstallTestingLibs(options):
+ print 'Making working directory.'
MakeWorkingDir(options)
try:
+ print 'Downloading and Extracting gtest.'
DownloadAndExtractAll(options)
+ print 'Patching gtest.'
PatchAll(options)
except:
+ # TODO(mlinck) improve this error
+ print 'An Error occurred'
return 1
+ print 'Building and installing gtest.'
BuildAndInstallAll(options)
# Clean up.
+ print 'Cleaning up gtest install files.'
shutil.rmtree(options.working_dir, ignore_errors=True)
return 0
« no previous file with comments | « build_tools/generate_windows_installer.py ('k') | build_tools/install_gtest/nacl-gmock-1.5.0.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698