Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ def git_update(self):

shutil.copy(f"git.{self.name}.out", self.suite.full_web_dir)

if self.suite.updateGitSubmodules == 1:
# update submodules to those specified by the current commit
# (--init is required because there may be new submodules since the last checkout)
self.suite.log.log(f"git submodule update in {self.dir}")
_, _, rc = test_util.run(f"git submodule update --init")

if rc != 0:
self.suite.log.fail("ERROR: git submodule update was unsuccessful")

def save_head(self):
"""Save the current head of the repo"""

Expand Down
4 changes: 3 additions & 1 deletion suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def __init__(self, args):
self.useCmake = 0
self.isSuperbuild = 0
self.use_ctools = 1

self.reportCoverage = args.with_coverage

# set automatically
Expand All @@ -435,6 +435,8 @@ def __init__(self, args):
self.amrex_install_dir = "" # Cmake installation dir
self.amrex_cmake_opts = ""

self.updateGitSubmodules = 0

self.MPIcommand = ""
self.MPIhost = ""

Expand Down
3 changes: 3 additions & 0 deletions test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
isSuperbuild = < 0: pre-build AMReX and source (default)
1: CMake downloads AMReX and needs separate configure & build >
updateGitSubmodules = < 0: don't update submodules when changing git branches (default)
1: run `git submodule update --init` after changing git branches >
sourceTree = < C_Src or AMReX >
suiteName = < descriptive name (i.e. Castro) >
Expand Down
Loading