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

Unified Diff: test/prune_targets/gyptest-prune-targets.py

Issue 24803004: Add an option to prune unwanted targets (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: incorporate review comments Created 7 years, 3 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 | « pylib/gyp/input.py ('k') | test/prune_targets/lib1.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/prune_targets/gyptest-prune-targets.py
diff --git a/test/prune_targets/gyptest-prune-targets.py b/test/prune_targets/gyptest-prune-targets.py
new file mode 100644
index 0000000000000000000000000000000000000000..6526975a3cb11db083ecb6f095eff5ae248fadc5
--- /dev/null
+++ b/test/prune_targets/gyptest-prune-targets.py
@@ -0,0 +1,55 @@
+#!/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 --root-target removes the unnecessary targets.
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp()
+
+# By default, everything will be included.
+test.run_gyp('test1.gyp')
+test.build('test1.gyp', 'lib1')
+test.build('test1.gyp', 'lib2')
+test.build('test1.gyp', 'lib3')
+test.build('test1.gyp', 'lib_indirect')
+test.build('test1.gyp', 'program1')
+test.build('test1.gyp', 'program2')
+test.build('test1.gyp', 'program3')
+
+# With deep dependencies of program1 only.
+test.run_gyp('test1.gyp', '--root-target=program1')
+test.build('test1.gyp', 'lib1')
+test.build('test1.gyp', 'lib2', status=[1,2], stderr=None)
+test.build('test1.gyp', 'lib3', status=[1,2], stderr=None)
+test.build('test1.gyp', 'lib_indirect')
+test.build('test1.gyp', 'program1')
+test.build('test1.gyp', 'program2', status=[1,2], stderr=None)
+test.build('test1.gyp', 'program3', status=[1,2], stderr=None)
+
+# With deep dependencies of program2 only.
+test.run_gyp('test1.gyp', '--root-target=program2')
+test.build('test1.gyp', 'lib1', status=[1,2], stderr=None)
+test.build('test1.gyp', 'lib2')
+test.build('test1.gyp', 'lib3', status=[1,2], stderr=None)
+test.build('test1.gyp', 'lib_indirect')
+test.build('test1.gyp', 'program1', status=[1,2], stderr=None)
+test.build('test1.gyp', 'program2')
+test.build('test1.gyp', 'program3', status=[1,2], stderr=None)
+
+# With deep dependencies of program1 and program2.
+test.run_gyp('test1.gyp', '--root-target=program1', '--root-target=program2')
+test.build('test1.gyp', 'lib1')
+test.build('test1.gyp', 'lib2')
+test.build('test1.gyp', 'lib3', status=[1,2], stderr=None)
+test.build('test1.gyp', 'lib_indirect')
+test.build('test1.gyp', 'program1')
+test.build('test1.gyp', 'program2')
+test.build('test1.gyp', 'program3', status=[1,2], stderr=None)
+
+test.pass_test()
« no previous file with comments | « pylib/gyp/input.py ('k') | test/prune_targets/lib1.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698