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..a062ab7593406a82800546f407b16bcb840ec6b3 |
--- /dev/null |
+++ b/test/prune_targets/gyptest-prune-targets.py |
@@ -0,0 +1,22 @@ |
+#!/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 --prune-targets removes the unnecessary targets. |
+""" |
+ |
+import TestGyp |
+ |
+test = TestGyp.TestGyp() |
+ |
+test.run_gyp('test1.gyp', '--prune-targets') |
+ |
+test.build('test1.gyp', 'lib_wanted') |
+test.build('test1.gyp', 'lib_wanted2') |
+test.build('test1.gyp', 'lib_unwanted', status=1, stderr=None) |
+test.build('test1.gyp', 'program') |
+ |
+test.pass_test() |