From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../multiple_actions_error_handling/action_fail.py | 7 ++++ .../action_succeed.py | 7 ++++ .../multiple_actions_error_handling/actions.gyp | 40 ++++++++++++++++++++++ .../multiple_actions_error_handling/gyptest.py | 26 ++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 third_party/python/gyp/test/msvs/multiple_actions_error_handling/action_fail.py create mode 100644 third_party/python/gyp/test/msvs/multiple_actions_error_handling/action_succeed.py create mode 100644 third_party/python/gyp/test/msvs/multiple_actions_error_handling/actions.gyp create mode 100644 third_party/python/gyp/test/msvs/multiple_actions_error_handling/gyptest.py (limited to 'third_party/python/gyp/test/msvs/multiple_actions_error_handling') diff --git a/third_party/python/gyp/test/msvs/multiple_actions_error_handling/action_fail.py b/third_party/python/gyp/test/msvs/multiple_actions_error_handling/action_fail.py new file mode 100644 index 0000000000..286fc4e132 --- /dev/null +++ b/third_party/python/gyp/test/msvs/multiple_actions_error_handling/action_fail.py @@ -0,0 +1,7 @@ +# Copyright (c) 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import sys + +sys.exit(1) diff --git a/third_party/python/gyp/test/msvs/multiple_actions_error_handling/action_succeed.py b/third_party/python/gyp/test/msvs/multiple_actions_error_handling/action_succeed.py new file mode 100644 index 0000000000..3554373197 --- /dev/null +++ b/third_party/python/gyp/test/msvs/multiple_actions_error_handling/action_succeed.py @@ -0,0 +1,7 @@ +# Copyright (c) 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import sys + +sys.exit(0) diff --git a/third_party/python/gyp/test/msvs/multiple_actions_error_handling/actions.gyp b/third_party/python/gyp/test/msvs/multiple_actions_error_handling/actions.gyp new file mode 100644 index 0000000000..ab99e929e2 --- /dev/null +++ b/third_party/python/gyp/test/msvs/multiple_actions_error_handling/actions.gyp @@ -0,0 +1,40 @@ +# Copyright (c) 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + 'target_name': 'actions-test', + 'type': 'none', + 'actions': [ + { + 'action_name': 'first action (fails)', + 'inputs': [ + 'action_fail.py', + ], + 'outputs': [ + 'ALWAYS_OUT_OF_DATE', + ], + 'action': [ + 'python', '<@(_inputs)' + ], + 'msvs_cygwin_shell': 0, + }, + { + 'action_name': 'second action (succeeds)', + 'inputs': [ + 'action_succeed.py', + ], + 'outputs': [ + 'ALWAYS_OUT_OF_DATE', + ], + 'action': [ + 'python', '<@(_inputs)' + ], + 'msvs_cygwin_shell': 0, + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/msvs/multiple_actions_error_handling/gyptest.py b/third_party/python/gyp/test/msvs/multiple_actions_error_handling/gyptest.py new file mode 100644 index 0000000000..3aa6b8fdb2 --- /dev/null +++ b/third_party/python/gyp/test/msvs/multiple_actions_error_handling/gyptest.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +# Copyright (c) 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that failing actions make the build fail reliably, even when there +are multiple actions in one project. +""" + +import os +import sys +import TestGyp +import TestCmd + +test = TestGyp.TestGyp(formats=['msvs'], workdir='workarea_all') + +test.run_gyp('actions.gyp') +test.build('actions.gyp', + target='actions-test', + status=1, + stdout=r'.*"cmd\.exe" exited with code 1\..*', + match=TestCmd.match_re_dotall) + +test.pass_test() -- cgit v1.2.3