1c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.com#!/usr/bin/env python 2df8224662e615bd36cf8bebae8e58c017201f998sgk@chromium.org 3df8224662e615bd36cf8bebae8e58c017201f998sgk@chromium.org# Copyright (c) 2009 Google Inc. All rights reserved. 4df8224662e615bd36cf8bebae8e58c017201f998sgk@chromium.org# Use of this source code is governed by a BSD-style license that can be 5df8224662e615bd36cf8bebae8e58c017201f998sgk@chromium.org# found in the LICENSE file. 6c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.com 7c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.com""" 8c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.comVerifies behavior for different action configuration errors: 9c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.comexit status of 1, and the expected error message must be in stderr. 10c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.com""" 11c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.com 12c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.comimport TestGyp 13c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.com 14c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.comtest = TestGyp.TestGyp(workdir='workarea_errors') 15c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.com 16c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.com 17c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.comtest.run_gyp('action_missing_name.gyp', chdir='src', status=1, stderr=None) 18c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.comexpect = [ 19c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.com "Anonymous action in target broken_actions2. An action must have an 'action_name' field.", 20c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.com] 21c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.comtest.must_contain_all_lines(test.stderr(), expect) 22c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.com 23c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.com 24c55f9ca139f2900a3e612c892b4276ed4652328bjeanluc@google.comtest.pass_test() 25