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

Unified Diff: test/actions-multiple-outputs-with-dependencies/gyptest-action.py

Issue 1177163002: Fix gyp->make translation of rules with several outputs. (Closed) Base URL: https://chromium.googlesource.com/external/gyp@master
Patch Set: Test case added. Created 5 years, 6 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/generator/make.py ('k') | test/actions-multiple-outputs-with-dependencies/src/action.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/actions-multiple-outputs-with-dependencies/gyptest-action.py
diff --git a/test/actions-multiple-outputs-with-dependencies/gyptest-action.py b/test/actions-multiple-outputs-with-dependencies/gyptest-action.py
new file mode 100755
index 0000000000000000000000000000000000000000..728eb205602ae76f57eb90e842e85d6ec292e62c
--- /dev/null
+++ b/test/actions-multiple-outputs-with-dependencies/gyptest-action.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2015 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 actions with multiple outputs & dependncies will correctly rebuild.
+
+This is a regression test for crrev.com/1177163002.
+"""
+
+import TestGyp
+import os
+import time
+
+test = TestGyp.TestGyp()
+
+TESTDIR='relocate/src'
+test.run_gyp('action.gyp', chdir='src')
+test.relocate('src', TESTDIR)
+
+def build_and_check(content):
+ test.write(TESTDIR + '/input.txt', content)
+ test.build('action.gyp', 'upper', chdir=TESTDIR)
+ test.built_file_must_match('result.txt', content, chdir=TESTDIR)
+
+build_and_check('Content for first build.')
+
+# Ninja works with timestamps and the test above is fast enough that the
+# 'updated' file may end up with the same timestamp as the original, meaning
+# that ninja may not always recognize the input file has changed.
+if test.format == 'ninja':
+ time.sleep(1)
+
+build_and_check('An updated input file.')
+
+test.pass_test()
« no previous file with comments | « pylib/gyp/generator/make.py ('k') | test/actions-multiple-outputs-with-dependencies/src/action.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698