• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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"""
8Verifies actions with multiple outputs will correctly rebuild.
9"""
10
11import TestGyp
12import os
13import sys
14
15if sys.platform == 'win32':
16  print "This test is currently disabled: https://crbug.com/483696."
17  sys.exit(0)
18
19test = TestGyp.TestGyp()
20
21test.run_gyp('multiple-outputs.gyp', chdir='src')
22
23chdir = 'relocate/src'
24test.relocate('src', chdir)
25
26def 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.
33build_and_check()
34
35# Remove either + rebuild. Both should exist (again).
36os.remove(test.built_file_path('out1.txt', chdir=chdir))
37build_and_check();
38
39# Remove the other + rebuild. Both should exist (again).
40os.remove(test.built_file_path('out2.txt', chdir=chdir))
41build_and_check();
42
43test.pass_test()
44