Introduce a helper module TestMac

Many tests have to check the version of Xcode (as new versions introduce
incompatibilities) so introduce a module TestMac with a singleton object
to help get information about Xcode via xcodebuild.

Move binary architecture introspection into the TestMac module as this
is shared between Mac OS X and iOS unit tests.

BUG=gyp:414
R=mark@chromium.org

Review URL: https://codereview.chromium.org/195023004

git-svn-id: http://gyp.googlecode.com/svn/trunk@1867 78cadc50-ecff-11dd-a971-7dbc132099af
Disable test/mac/gyptest-objc-gc.py when using Xcode 5.1

Xcode 5.1 removed support for garbage collection, and no longer recognize
the GCC_ENABLE_OBJC_GC settings, so disable the corresponding test.

BUG=gyp:414
R=mark@chromium.org

Review URL: https://codereview.chromium.org/196973002

git-svn-id: http://gyp.googlecode.com/svn/trunk@1868 78cadc50-ecff-11dd-a971-7dbc132099af
Fix test/mac/gyptest-strip.py with Xcode 5.0 or higher

The version of clang that ships with Xcode 5.0 and higher add an extra
symbol if the command-line use a relative path with more than one
component to reference the source file (like ./file.c). This extra
symbol is not present if using an absolute path to the file, and cause
a difference of behaviour between xcodebuild and ninja.

Account for the extra symbol in the un-stripped binaries when building
with ninja and using Xcode 5.0 or higher. A possible alternative would
be to always use absolute path with ninja, but it would make the build
environment non-relocatable.

BUG=gyp:381
R=mark@chromium.org

Review URL: https://codereview.chromium.org/197073002

git-svn-id: http://gyp.googlecode.com/svn/trunk@1869 78cadc50-ecff-11dd-a971-7dbc132099af
Fix missing variable MSVS expansion of copies arguments with Ninja.

The Visual Studio emulation does not expand the special
variables like 'VSInstallDir' into the 'copies' actions.

Here is a small broken example:

{
  'targets': [
    {
      'target_name': 'Copy_Target',
      'type': 'none',
      'copies': [
        {
          'destination': '<(PRODUCT_DIR)',
          'files': [
            '$(VSInstallDir)\\bin\\cl.exe',
          ],
        },
      ],
    },
  ],
}

Patch from etienneb@chromium.org.

R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/194883010

git-svn-id: http://gyp.googlecode.com/svn/trunk@1870 78cadc50-ecff-11dd-a971-7dbc132099af