aboutsummaryrefslogtreecommitdiff
path: root/llvm_tools/failure_modes.py
diff options
context:
space:
mode:
authorSalud Lemus <saludlemus@google.com>2019-07-18 14:26:28 -0700
committerSalud Lemus <saludlemus@google.com>2019-08-01 22:43:55 +0000
commit41b6b6f660aa2d43728edd0d0567ca5101eac4d1 (patch)
tree51e6e41c5e541075ec418c1ba4cb761e68bf20b8 /llvm_tools/failure_modes.py
parent46c8b289cfca6bd7bdff6f1fbe9728647d9d8a47 (diff)
downloadtoolchain-utils-41b6b6f660aa2d43728edd0d0567ca5101eac4d1.tar.gz
LLVM tools: patch management for LLVM and patch manager
The script 'llvm_patch_management.py' constructs the arguments for the patch manager to handle patches of a package. The script 'patch_manager.py' is the patch manager. The patch manager has different modes to handle all applicable patches that fail to apply. The mode 'bisect_patches' is a WIP. BUG=None TEST=Created a json file that has the patches of the LLVM ebuild and used the default failure mode of the patch manager. All patches applied successfully for r365631. Change-Id: I42f339ac0bb7c35d70a96cc0c2daeb470336b13c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1708223 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
Diffstat (limited to 'llvm_tools/failure_modes.py')
-rw-r--r--llvm_tools/failure_modes.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm_tools/failure_modes.py b/llvm_tools/failure_modes.py
new file mode 100644
index 00000000..6a381c2e
--- /dev/null
+++ b/llvm_tools/failure_modes.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Failure mode constants avaiable to the patch manager."""
+
+from __future__ import print_function
+
+import enum
+
+
+class FailureModes(enum.Enum):
+ """Different modes for the patch manager when handling a failed patch."""
+
+ FAIL = 'fail'
+ CONTINUE = 'continue'
+ DISABLE_PATCHES = 'disable_patches'
+ BISECT_PATCHES = 'bisect_patches'
+ REMOVE_PATCHES = 'remove_patches'