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

Side by Side Diff: test/lib/TestGyp.py

Issue 9139003: ninja/mac: Put dylibs directly into the product directory. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: '' Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | test/mac/copy-dylib/empty.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """ 5 """
6 TestGyp.py: a testing framework for GYP integration tests. 6 TestGyp.py: a testing framework for GYP integration tests.
7 """ 7 """
8 8
9 import os 9 import os
10 import re 10 import re
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 target = 'all' 439 target = 'all'
440 arguments.append(target) 440 arguments.append(target)
441 441
442 kw['arguments'] = arguments 442 kw['arguments'] = arguments
443 return self.run(program=self.build_tool, **kw) 443 return self.run(program=self.build_tool, **kw)
444 444
445 def run_built_executable(self, name, *args, **kw): 445 def run_built_executable(self, name, *args, **kw):
446 # Enclosing the name in a list avoids prepending the original dir. 446 # Enclosing the name in a list avoids prepending the original dir.
447 program = [self.built_file_path(name, type=self.EXECUTABLE, **kw)] 447 program = [self.built_file_path(name, type=self.EXECUTABLE, **kw)]
448 if sys.platform == 'darwin': 448 if sys.platform == 'darwin':
449 libdir = os.path.join('out', 'Default', 'lib') 449 libdir = os.path.join('out', 'Default')
450 if self.configuration: 450 if self.configuration:
451 libdir = os.path.join('out', self.configuration, 'lib') 451 libdir = os.path.join('out', self.configuration)
452 os.environ['DYLD_LIBRARY_PATH'] = libdir 452 os.environ['DYLD_LIBRARY_PATH'] = libdir
453 return self.run(program=program, *args, **kw) 453 return self.run(program=program, *args, **kw)
454 454
455 def built_file_path(self, name, type=None, **kw): 455 def built_file_path(self, name, type=None, **kw):
456 result = [] 456 result = []
457 chdir = kw.get('chdir') 457 chdir = kw.get('chdir')
458 if chdir: 458 if chdir:
459 result.append(chdir) 459 result.append(chdir)
460 result.append('out') 460 result.append('out')
461 result.append(self.configuration_dirname()) 461 result.append(self.configuration_dirname())
462 if type == self.STATIC_LIB: 462 if type == self.STATIC_LIB:
463 if sys.platform != 'darwin': 463 if sys.platform != 'darwin':
464 result.append('obj') 464 result.append('obj')
465 elif type == self.SHARED_LIB: 465 elif type == self.SHARED_LIB:
466 result.append('lib') 466 if sys.platform != 'darwin':
467 result.append('lib')
467 subdir = kw.get('subdir') 468 subdir = kw.get('subdir')
468 if subdir: 469 if subdir:
469 result.append(subdir) 470 result.append(subdir)
470 result.append(self.built_file_basename(name, type, **kw)) 471 result.append(self.built_file_basename(name, type, **kw))
471 return self.workpath(*result) 472 return self.workpath(*result)
472 473
473 def up_to_date(self, gyp_file, target=None, **kw): 474 def up_to_date(self, gyp_file, target=None, **kw):
474 result = self.build(gyp_file, target, **kw) 475 result = self.build(gyp_file, target, **kw)
475 if not result: 476 if not result:
476 stdout = self.stdout() 477 stdout = self.stdout()
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 """ 805 """
805 format = kw.get('format') 806 format = kw.get('format')
806 if format: 807 if format:
807 del kw['format'] 808 del kw['format']
808 else: 809 else:
809 format = os.environ.get('TESTGYP_FORMAT') 810 format = os.environ.get('TESTGYP_FORMAT')
810 for format_class in format_class_list: 811 for format_class in format_class_list:
811 if format == format_class.format: 812 if format == format_class.format:
812 return format_class(*args, **kw) 813 return format_class(*args, **kw)
813 raise Exception, "unknown format %r" % format 814 raise Exception, "unknown format %r" % format
OLDNEW
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | test/mac/copy-dylib/empty.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698