Example #1
0
 def testArmLinux(self):
     build_artifacts.PLATFORM = 'linux'
     build_artifacts.GypNinjaBuild('arm', 'gyp.py', 'foo.gyp', 'target',
                                   'out_dir')
     self.run_mock.assert_has_calls([
         call(
             [
                 'python', 'gyp.py', 'foo.gyp', '--depth=.', '-G',
                 'output_dir=out_dir'
             ],
             cwd='src_dir',
             env={
                 'GYP_CROSSCOMPILE': '1',
                 'GYP_GENERATORS': 'ninja',
                 'GYP_DEFINES': 'target_arch=arm arm_float_abi=hard',
             }),
         call(['ninja', '-C', 'out_dir/Release', 'target'], cwd='src_dir')
     ])
Example #2
0
 def testMacSdk(self):
     build_artifacts.PLATFORM = 'mac'
     self.options_mock.mac_sdk = '10.6'
     build_artifacts.GypNinjaBuild(None, 'gyp.py', 'foo.gyp', 'target',
                                   'out_dir')
     self.run_mock.assert_has_calls([
         call(
             [
                 'python', 'gyp.py', 'foo.gyp', '--depth=.', '-G',
                 'output_dir=out_dir'
             ],
             cwd='src_dir',
             env={
                 'GYP_GENERATORS':
                 'ninja',
                 'GYP_DEFINES':
                 ' '.join(self.gyp_defines_base +
                          ['mac_sdk=10.6', 'clang=1']),
             }),
         call(['ninja', '-C', 'out_dir/Release', 'target'], cwd='src_dir')
     ])
Example #3
0
 def testNoArmTrusted(self):
     build_artifacts.PLATFORM = 'linux'
     self.options_mock.no_arm_trusted = True
     build_artifacts.GypNinjaBuild('arm', 'gyp.py', 'foo.gyp', 'target',
                                   'out_dir')
     self.run_mock.assert_has_calls([
         call(
             [
                 'python', 'gyp.py', 'foo.gyp', '--depth=.', '-G',
                 'output_dir=out_dir'
             ],
             cwd='src_dir',
             env={
                 'GYP_CROSSCOMPILE':
                 '1',
                 'GYP_DEFINES':
                 ' '.join(self.gyp_defines_base +
                          ['target_arch=arm', 'disable_cross_trusted=1']),
             }),
         call(['ninja', '-C', 'out_dir/Release', 'target'], cwd='src_dir')
     ])