diff options
author | Salud Lemus <saludlemus@google.com> | 2019-08-07 14:12:15 -0700 |
---|---|---|
committer | Salud Lemus <saludlemus@google.com> | 2019-08-12 15:43:07 +0000 |
commit | d2067bc7aafa9b7c9b13e0c932277ea296eff86a (patch) | |
tree | 4d26b80f4fb1ae1b27f6a9d30f88bf9ea430354e /llvm_tools/llvm_patch_management.py | |
parent | 2c8a3adfa9417c6cf67bca3f5286f0675493ad9d (diff) | |
download | toolchain-utils-d2067bc7aafa9b7c9b13e0c932277ea296eff86a.tar.gz |
LLVM tools: Assert that the scripts are not run inside the chroot
BUG=None
TEST=Scripts terminated when ran inside the chroot
Change-Id: Id7060ca6554a05f158160e73759763663dec1ce9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1742544
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Salud Lemus <saludlemus@google.com>
Diffstat (limited to 'llvm_tools/llvm_patch_management.py')
-rwxr-xr-x | llvm_tools/llvm_patch_management.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm_tools/llvm_patch_management.py b/llvm_tools/llvm_patch_management.py index e50b99dd..b315111b 100755 --- a/llvm_tools/llvm_patch_management.py +++ b/llvm_tools/llvm_patch_management.py @@ -14,6 +14,7 @@ import os import patch_manager import re +from assert_not_in_chroot import VerifyOutsideChroot from cros_utils import command_executer from failure_modes import FailureModes from get_google3_llvm_version import LLVMVersion @@ -310,7 +311,13 @@ def UpdatePackagesPatchMetadataFile(chroot_path, svn_version, def main(): - """Updates the patch metadata file of each package if possible.""" + """Updates the patch metadata file of each package if possible. + + Raises: + AssertionError: The script was run inside the chroot. + """ + + VerifyOutsideChroot() args_output = GetCommandLineArgs() |