~hjd/ubuntu/wily/gyp/debian-merged

« back to all changes in this revision

Viewing changes to test/actions-multiple-outputs/gyptest-multiple-outputs.py

  • Committer: Hans Joachim Desserud
  • Date: 2015-10-31 12:46:59 UTC
  • mfrom: (6.2.6 sid)
  • Revision ID: hans_joachim_desserud-20151031124659-lzxekr6woskh4k0b
Merge latest Debian version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
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
 
5
# found in the LICENSE file.
 
6
 
 
7
"""
 
8
Verifies actions with multiple outputs will correctly rebuild.
 
9
"""
 
10
 
 
11
import TestGyp
 
12
import os
 
13
import sys
 
14
 
 
15
if sys.platform == 'win32':
 
16
  print "This test is currently disabled: https://crbug.com/483696."
 
17
  sys.exit(0)
 
18
 
 
19
test = TestGyp.TestGyp()
 
20
 
 
21
test.run_gyp('multiple-outputs.gyp', chdir='src')
 
22
 
 
23
chdir = 'relocate/src'
 
24
test.relocate('src', chdir)
 
25
 
 
26
def build_and_check():
 
27
  # Build + check that both outputs exist.
 
28
  test.build('multiple-outputs.gyp', chdir=chdir)
 
29
  test.built_file_must_exist('out1.txt', chdir=chdir)
 
30
  test.built_file_must_exist('out2.txt', chdir=chdir)
 
31
 
 
32
# Plain build.
 
33
build_and_check()
 
34
 
 
35
# Remove either + rebuild. Both should exist (again).
 
36
os.remove(test.built_file_path('out1.txt', chdir=chdir))
 
37
build_and_check();
 
38
 
 
39
# Remove the other + rebuild. Both should exist (again).
 
40
os.remove(test.built_file_path('out2.txt', chdir=chdir))
 
41
build_and_check();
 
42
 
 
43
test.pass_test()