Home | History | Annotate | Download | only in ios
      1 #!/usr/bin/env python
      2 
      3 # Copyright (c) 2014 Google Inc. All rights reserved.
      4 # Use of this source code is governed by a BSD-style license that can be
      5 # found in the LICENSE file.
      6 
      7 """
      8 Verifies that tools are built correctly.
      9 """
     10 
     11 import TestGyp
     12 import TestMac
     13 
     14 import sys
     15 import os
     16 
     17 if sys.platform == 'darwin':
     18   test = TestGyp.TestGyp(formats=['ninja', 'xcode'])
     19 
     20   oldenv = os.environ.copy()
     21   try:
     22     os.environ['GYP_CROSSCOMPILE'] = '1'
     23     test.run_gyp('test-crosscompile.gyp', chdir='app-bundle')
     24   finally:
     25     os.environ.clear()
     26     os.environ.update(oldenv)
     27 
     28   test.set_configuration('Default')
     29   test.build('test-crosscompile.gyp', 'TestHost', chdir='app-bundle')
     30   result_file = test.built_file_path('TestHost', chdir='app-bundle')
     31   test.must_exist(result_file)
     32   TestMac.CheckFileType(test, result_file, ['x86_64'])
     33 
     34   test.pass_test()
     35