path: root/scripts
diff options
authorDiana Picus <diana.picus@linaro.org>2018-02-07 01:33:17 +0100
committerDiana Picus <diana.picus@linaro.org>2018-02-12 17:56:22 +0100
commitb1dbcbaca1a3a5806f55b55ccf82c30cd2e25629 (patch)
treed1227457e1dc56aa9571408abb9234a524976c56 /scripts
parent11d735d991c1dfb7ba0d47463f3ae3812a7867cc (diff)
Dry run-ify LLVMSourceConfig
Make it possible to use LLVMSourceConfig in dry run mode. This is useful because otherwise we can't have a dry run on *any* scripts that use an LLVMSourceConfig, since it might throw errors that wouldn't occur in non-dry mode. This is different from non-dry run in the following ways: * we do not perform any validation of the source directory (since in dry run mode it is reasonable to expect that the directory doesn't even exist yet) * we do not try to add or remove any subprojects on disk Instead, we do try to keep track of our updates (which projects are added and which are removed). We don't however look at what may exist on disk since that increases the complexity of the code significantly and it is very likely that scripts will create a source directory from scratch rather than use one where subprojects have already been added. We may want to fix that after a bit of refactoring. Change-Id: Ic12c292b9cdc932aa5de3fa780af5e608dcba01c
Diffstat (limited to 'scripts')
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/llvm.py b/scripts/llvm.py
index cce0ef4..3a4954c 100644
--- a/scripts/llvm.py
+++ b/scripts/llvm.py
@@ -52,7 +52,7 @@ def projects(args):
llvm_worktree_root = args.sources
llvm_repos_root = args.repos
- config = LLVMSourceConfig(proj, llvm_worktree_root)
+ config = LLVMSourceConfig(proj, llvm_worktree_root, dry=False)
if not args.add and not args.remove:
# Nothing to change, just print the current configuration
@@ -79,7 +79,7 @@ def push_current_branch(args):
proj = Proj()
llvm_worktree_root = args.sources
- config = LLVMSourceConfig(proj, llvm_worktree_root)
+ config = LLVMSourceConfig(proj, llvm_worktree_root, dry=False)
llvm_worktree = Clone(proj, llvm_worktree_root)
local_branch = llvm_worktree.getbranch()
@@ -99,7 +99,7 @@ def configure_build(args):
proj = Proj()
llvm_worktree_root = args.sources
- sourceConfig = LLVMSourceConfig(proj, llvm_worktree_root)
+ sourceConfig = LLVMSourceConfig(proj, llvm_worktree_root, args.dry)
buildConfig = LLVMBuildConfig(sourceConfig, args.build)