Sha256: 4e84c7a7d77a869d09c3373f1252021eec921d3cb839b7374aa07458fbe7b94c

Contents?: true

Size: 1.14 KB

Versions: 39

Compression:

Stored size: 1.14 KB

Contents

#!/usr/bin/env python

# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""
Tests things related to ARCHS.
"""

import TestGyp

import subprocess
import sys

if sys.platform == 'darwin':
  test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])

  def CheckFileType(file, expected):
    proc = subprocess.Popen(['file', '-b', file], stdout=subprocess.PIPE)
    o = proc.communicate()[0].strip()
    assert not proc.returncode
    if o != expected:
      print 'File: Expected %s, got %s' % (expected, o)
      test.fail_test()

  test.run_gyp('test-no-archs.gyp', chdir='archs')
  test.build('test-no-archs.gyp', test.ALL, chdir='archs')
  result_file = test.built_file_path('Test', chdir='archs')
  test.must_exist(result_file)
  CheckFileType(result_file, 'Mach-O executable i386')

  test.run_gyp('test-archs-x86_64.gyp', chdir='archs')
  test.build('test-archs-x86_64.gyp', test.ALL, chdir='archs')
  result_file = test.built_file_path('Test64', chdir='archs')
  test.must_exist(result_file)
  CheckFileType(result_file, 'Mach-O 64-bit executable x86_64')

Version data entries

39 entries across 39 versions & 5 rubygems

Version Path
libv8-3.16.14.19.1 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.19 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.18 vendor/gyp/test/mac/gyptest-archs.py
arcabouco-0.2.13 vendor/bundle/gems/libv8-3.16.14.17/vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.17 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.16 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.15 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.14 vendor/gyp/test/mac/gyptest-archs.py
libv8-tmpfork-3.16.14.13 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.13 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.12 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.11 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.10 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.8 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.8.rc1 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.7 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.6 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.5 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.4 vendor/gyp/test/mac/gyptest-archs.py
libv8-3.16.14.3 vendor/gyp/test/mac/gyptest-archs.py