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""" Verifies that stdout and stderr from rules get logged in the build's 8stdout.""" 9 10import sys 11import TestGyp 12 13if sys.platform == 'win32': 14 test = TestGyp.TestGyp(formats=['msvs']) 15 16 test.run_gyp('rules-stdout-stderr.gyp') 17 test.build('rules-stdout-stderr.gyp', test.ALL) 18 19 expected_stdout_lines = [ 20 'testing stdout', 21 'This will go to stdout', 22 23 # Note: stderr output from rules will go to the build's stdout. 24 'testing stderr', 25 'This will go to stderr', 26 ] 27 test.must_contain_all_lines(test.stdout(), expected_stdout_lines) 28 29 test.pass_test() 30