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

Unified Diff: test/ios/gyptest-archs.py

Issue 81213003: Fix default ARCHS value for iOS project. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Addressing comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/ios/app-bundle/test-archs.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/ios/gyptest-archs.py
diff --git a/test/ios/gyptest-archs.py b/test/ios/gyptest-archs.py
new file mode 100644
index 0000000000000000000000000000000000000000..7b5a070d54d22341cad4294f286e0c9b49271a3b
--- /dev/null
+++ b/test/ios/gyptest-archs.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2013 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""
+Verifies that device and simulator bundles are built correctly.
+"""
+
+import plistlib
+import TestGyp
+import os
+import struct
+import subprocess
+import sys
+import tempfile
+
+
+def CheckFileType(file, expected):
+ proc = subprocess.Popen(['lipo', '-info', file], stdout=subprocess.PIPE)
+ o = proc.communicate()[0].strip()
+ assert not proc.returncode
+ if not expected in o:
+ print 'File: Expected %s, got %s' % (expected, o)
+ test.fail_test()
+
+
+if sys.platform == 'darwin':
+ test = TestGyp.TestGyp()
+
+ test.run_gyp('test-archs.gyp', chdir='app-bundle')
+ test.set_configuration('Default')
+ test.build('test-archs.gyp', test.ALL, chdir='app-bundle')
+
+ for filename in ['Test No Archs', 'Test Archs i386', 'Test Archs x86_64']:
+ result_file = test.built_file_path(
+ '%s.bundle/%s' % (filename, filename), chdir='app-bundle')
+ test.must_exist(result_file)
+
+ expected = 'i386'
+ if 'x86_64' in filename:
+ expected = 'x86_64'
+ CheckFileType(result_file, expected)
+
+ test.pass_test()
« no previous file with comments | « test/ios/app-bundle/test-archs.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698