Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(572)

Side by Side Diff: test/mac/gyptest-xcuitest.py

Issue 1876623002: Adds support for a new target spec: 'mac_xcuitest_bundle'. This allows us to create UI testing bund… (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pylib/gyp/xcodeproj_file.py ('k') | test/mac/xcuitest/Info.plist » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2013 Google Inc. All rights reserved. 3 # Copyright (c) 2013 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 xctest targets are correctly configured. 8 Verifies that xcuitest targets are correctly configured.
9 """ 9 """
10 10
11 import TestGyp 11 import TestGyp
12 12
13 import sys 13 import sys
14 14
15 if sys.platform == 'darwin': 15 if sys.platform == 'darwin':
16 test = TestGyp.TestGyp(formats=['xcode']) 16 test = TestGyp.TestGyp(formats=['xcode'])
17 17
18 # Ignore this test if Xcode 5 is not installed 18 # Ignore this test if Xcode 5 is not installed
19 import subprocess 19 import subprocess
20 job = subprocess.Popen(['xcodebuild', '-version'], 20 job = subprocess.Popen(['xcodebuild', '-version'],
21 stdout=subprocess.PIPE, 21 stdout=subprocess.PIPE,
22 stderr=subprocess.STDOUT) 22 stderr=subprocess.STDOUT)
23 out, err = job.communicate() 23 out, err = job.communicate()
24 if job.returncode != 0: 24 if job.returncode != 0:
25 raise Exception('Error %d running xcodebuild' % job.returncode) 25 raise Exception('Error %d running xcodebuild' % job.returncode)
26 xcode_version, build_number = out.splitlines() 26 xcode_version, build_number = out.splitlines()
27 # Convert the version string from 'Xcode 5.0' to ['5','0']. 27 # Convert the version string from 'Xcode 5.0' to ['5','0'].
28 xcode_version = xcode_version.split()[-1].split('.') 28 xcode_version = xcode_version.split()[-1].split('.')
29 if xcode_version < ['5']: 29 if xcode_version < ['7']:
30 test.pass_test() 30 test.pass_test()
31 31
32 CHDIR = 'xctest' 32 CHDIR = 'xcuitest'
33 test.run_gyp('test.gyp', chdir=CHDIR) 33 test.run_gyp('test.gyp', chdir=CHDIR)
34 test.build('test.gyp', chdir=CHDIR, arguments=['-scheme', 'classes', 'test']) 34 test.build('test.gyp', chdir=CHDIR, arguments=[
35 '-target', 'tests',
36 '-sdk', 'iphonesimulator',
37 ])
35 38
36 test.built_file_must_match('tests.xctest/Contents/Resources/resource.txt',
37 'foo\n', chdir=CHDIR)
38 test.pass_test() 39 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/xcodeproj_file.py ('k') | test/mac/xcuitest/Info.plist » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698