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

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

Issue 1454433002: Python 3 compatibility Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase with master (4ec6c4e3a94bd04a6da2858163d40b2429b8aad1) Created 4 years, 8 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2015 Google Inc. All rights reserved. 3 # Copyright (c) 2015 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """ 7 """
8 Verifies actions with multiple outputs & dependncies will correctly rebuild. 8 Verifies actions with multiple outputs & dependncies will correctly rebuild.
9 9
10 This is a regression test for crrev.com/1177163002. 10 This is a regression test for crrev.com/1177163002.
11 """ 11 """
12 12
13 from __future__ import print_function
14
13 import TestGyp 15 import TestGyp
14 import os 16 import os
15 import sys 17 import sys
16 import time 18 import time
17 19
18 if sys.platform in ('darwin', 'win32'): 20 if sys.platform in ('darwin', 'win32'):
19 print "This test is currently disabled: https://crbug.com/483696." 21 print("This test is currently disabled: https://crbug.com/483696.")
20 sys.exit(0) 22 sys.exit(0)
21 23
22 test = TestGyp.TestGyp() 24 test = TestGyp.TestGyp()
23 25
24 TESTDIR='relocate/src' 26 TESTDIR='relocate/src'
25 test.run_gyp('action.gyp', chdir='src') 27 test.run_gyp('action.gyp', chdir='src')
26 test.relocate('src', TESTDIR) 28 test.relocate('src', TESTDIR)
27 29
28 def build_and_check(content): 30 def build_and_check(content):
29 test.write(TESTDIR + '/input.txt', content) 31 test.write(TESTDIR + '/input.txt', content)
30 test.build('action.gyp', 'upper', chdir=TESTDIR) 32 test.build('action.gyp', 'upper', chdir=TESTDIR)
31 test.built_file_must_match('result.txt', content, chdir=TESTDIR) 33 test.built_file_must_match('result.txt', content, chdir=TESTDIR)
32 34
33 build_and_check('Content for first build.') 35 build_and_check('Content for first build.')
34 36
35 # Ninja works with timestamps and the test above is fast enough that the 37 # Ninja works with timestamps and the test above is fast enough that the
36 # 'updated' file may end up with the same timestamp as the original, meaning 38 # 'updated' file may end up with the same timestamp as the original, meaning
37 # that ninja may not always recognize the input file has changed. 39 # that ninja may not always recognize the input file has changed.
38 if test.format == 'ninja': 40 if test.format == 'ninja':
39 time.sleep(1) 41 time.sleep(1)
40 42
41 build_and_check('An updated input file.') 43 build_and_check('An updated input file.')
42 44
43 test.pass_test() 45 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698