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

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

Issue 51413002: Adds generator support for Xcode 5 xctest targets. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
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
5 # found in the LICENSE file.
6
7 """
8 Verifies that xctest targets are correctly configured.
9 """
10
11 import TestGyp
12
13 import sys
14
15 if sys.platform == 'darwin':
16 test = TestGyp.TestGyp(formats=['xcode'])
17
18 # Ignore this test if Xcode 5 is not installed
19 import subprocess
20 job = subprocess.Popen(['xcodebuild', '-version'],
21 stdout=subprocess.PIPE,
22 stderr=subprocess.STDOUT)
23 out, err = job.communicate()
24 if job.returncode != 0:
25 raise Exception('Error %d running xcodebuild' % job.returncode)
26 xcode_version, build_number = out.splitlines()
27 # Convert the version string from 'Xcode 5.0' to ['5','0'].
28 xcode_version = xcode_version.split()[-1].split('.')
29 if xcode_version < ['5']:
30 test.pass_test()
31
32 CHDIR = 'xctest'
33 test.run_gyp('test.gyp', chdir=CHDIR)
34 test.build('test.gyp', chdir=CHDIR, arguments=['-scheme', 'classes', 'test'])
35
36 test.built_file_must_match('tests.xctest/Contents/Resources/resource.txt',
37 'foo\n', chdir=CHDIR)
38 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698