| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2014 Google Inc. All rights reserved. | 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 | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """ | 7 """ |
| 8 Verifies that ios app extensions are built correctly. | 8 Verifies that ios app extensions are built correctly. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 import TestGyp | 11 import TestGyp |
| 12 import TestMac | 12 import TestMac |
| 13 import subprocess |
| 14 |
| 15 def CheckStrip(p, n_expected): |
| 16 if "ActionViewController" not in subprocess.check_output(['nm','-gU', p]): |
| 17 print "ActionViewController shouldn't get stripped out." |
| 18 test.fail_test() |
| 13 | 19 |
| 14 import sys | 20 import sys |
| 15 if sys.platform == 'darwin' and TestMac.Xcode.Version()>="0600": | 21 if sys.platform == 'darwin' and TestMac.Xcode.Version()>="0600": |
| 16 print "This test is currently disabled: https://crbug.com/483696." | |
| 17 sys.exit(0) | |
| 18 | 22 |
| 19 test = TestGyp.TestGyp(formats=['ninja', 'xcode']) | 23 test = TestGyp.TestGyp(formats=['ninja', 'xcode']) |
| 20 | 24 |
| 21 test.run_gyp('extension.gyp', chdir='extension') | 25 test.run_gyp('extension.gyp', chdir='extension') |
| 22 | 26 |
| 23 test.build('extension.gyp', 'ExtensionContainer', chdir='extension') | 27 test.build('extension.gyp', 'ExtensionContainer', chdir='extension') |
| 24 | 28 |
| 25 # Test that the extension is .appex | 29 # Test that the extension is .appex |
| 26 test.built_file_must_exist( | 30 test.built_file_must_exist( |
| 27 'ExtensionContainer.app/PlugIns/ActionExtension.appex', | 31 'ExtensionContainer.app/PlugIns/ActionExtension.appex', |
| 28 chdir='extension') | 32 chdir='extension') |
| 29 | 33 |
| 34 path = test.built_file_path( |
| 35 'ExtensionContainer.app/PlugIns/ActionExtension.appex/ActionExtension', |
| 36 chdir='extension') |
| 37 CheckStrip(path, "ActionViewController") |
| 38 |
| 30 test.pass_test() | 39 test.pass_test() |
| 31 | 40 |
| OLD | NEW |