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

Side by Side Diff: test/standalone-static-library/gyptest-standalone-static-library.py

Issue 11031005: Add "standalone_static_library" flag (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
3 # Copyright (c) 2012 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 build of a static_library with the standalone_static_library flag set.
9 """
10
11 import os
12 import subprocess
13 import sys
14 import TestGyp
15
16 test = TestGyp.TestGyp()
17
18 test.run_gyp('mylib.gyp')
19 test.build('mylib.gyp', target='prog')
20
21 # Verify that the static library is copied to PRODUCT_DIR
Nico 2012/10/03 03:42:14 nit:Style guide says to have trailing '.'s on all
22 built_lib = test.built_file_basename('mylib', type=test.STATIC_LIB)
23 path = test.built_file_path(built_lib)
24 test.must_exist(path)
25
26 # Verify that the program runs properly
27 expect = 'hello from mylib.c\n'
28 test.run_built_executable('prog', stdout=expect)
29
30 # Verify that libmylib.a contains symbols. "ar -x" fails on a 'thin' archive.
31 if test.format in ('make', 'ninja') and sys.platform.startswith('linux'):
32 retcode = subprocess.call(['ar', '-x', path])
33 assert retcode == 0
34
35 test.pass_test()
OLDNEW
« no previous file with comments | « test/configurations/invalid/standalone_static_library.gyp ('k') | test/standalone-static-library/mylib.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698