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

Unified Diff: test/standalone-static-library/gyptest-standalone-static-library.py

Issue 11048018: Add "standalone_static_library" target 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/standalone-static-library/gyptest-standalone-static-library.py
===================================================================
--- test/standalone-static-library/gyptest-standalone-static-library.py (revision 0)
+++ test/standalone-static-library/gyptest-standalone-static-library.py (revision 0)
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2012 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 build of a static_library with the standalone_static_library flag set.
+"""
+
+import os
+import subprocess
+import sys
+import TestGyp
+
+test = TestGyp.TestGyp()
+
+test.run_gyp('mylib.gyp')
+test.build('mylib.gyp', target='prog')
+
+# Verify that the static library is copied to PRODUCT_DIR
+built_lib = test.built_file_basename('mylib', type=test.STATIC_LIB)
+path = test.built_file_path(built_lib)
+test.must_exist(path)
+
+# Verify that the program runs properly
+expect = 'hello from mylib.c\n'
+test.run_built_executable('prog', stdout=expect)
+
+# Verify that libmylib.a contains symbols. "ar -x" fails on a 'thin' archive.
+if test.format in ('make', 'ninja') and sys.platform.startswith('linux'):
+ retcode = subprocess.call(['ar', '-x', path])
+ assert retcode == 0
+
+test.pass_test()
Property changes on: test/standalone-static-library/gyptest-standalone-static-library.py
___________________________________________________________________
Added: svn:eol-style
+ LF
« 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