+2013-01-16 David Kilzer <ddkilzer@apple.com>
+
+ Use xcrun to find path to make for Mac port
+ <http://webkit.org/b/107091>
+
+ Reviewed by Dan Bernstein.
+
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort._build_java_test_support): Call self.make_command().
+ (MacPort.make_command): Add. Call xcrun_find().
+ (MacPort.nm_command): Use self.xcrun_find().
+ (MacPort.xcrun_find): Add. Extract from nm_command().
+
2013-01-16 Sam Weinig <sam@webkit.org>
Make debug-safari --target-web-process work again
# Copyright (C) 2011 Google Inc. All rights reserved.
-# Copyright (C) 2012 Apple Inc. All rights reserved.
+# Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
def _build_java_test_support(self):
java_tests_path = self._filesystem.join(self.layout_tests_dir(), "java")
- build_java = ["/usr/bin/make", "-C", java_tests_path]
+ build_java = [self.make_command(), "-C", java_tests_path]
if self._executive.run_command(build_java, return_exit_code=True): # Paths are absolute, so we don't need to set a cwd.
_log.error("Failed to build Java support files: %s" % build_java)
return False
_log.debug("IOError raised while stopping helper: %s" % str(e))
self._helper = None
+ def make_command(self):
+ return self.xcrun_find('make', '/usr/bin/make')
+
def nm_command(self):
+ return self.xcrun_find('nm', 'nm')
+
+ def xcrun_find(self, command, fallback):
try:
- return self._executive.run_command(['xcrun', '-find', 'nm']).rstrip()
+ return self._executive.run_command(['xcrun', '-find', command]).rstrip()
except ScriptError:
- _log.warn("xcrun failed; falling back to 'nm'.")
- return 'nm'
+ _log.warn("xcrun failed; falling back to '%s'." % fallback)
+ return fallback