File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,15 @@ def git_update(self):
9898
9999 shutil .copy (f"git.{ self .name } .out" , self .suite .full_web_dir )
100100
101+ if self .suite .updateGitSubmodules == 1 :
102+ # update submodules to those specified by the current commit
103+ # (--init is required because there may be new submodules since the last checkout)
104+ self .suite .log .log (f"git submodule update in { self .dir } " )
105+ _ , _ , rc = test_util .run (f"git submodule update --init" )
106+
107+ if rc != 0 :
108+ self .suite .log .fail ("ERROR: git submodule update was unsuccessful" )
109+
101110 def save_head (self ):
102111 """Save the current head of the repo"""
103112
Original file line number Diff line number Diff line change @@ -419,7 +419,7 @@ def __init__(self, args):
419419 self .useCmake = 0
420420 self .isSuperbuild = 0
421421 self .use_ctools = 1
422-
422+
423423 self .reportCoverage = args .with_coverage
424424
425425 # set automatically
@@ -435,6 +435,8 @@ def __init__(self, args):
435435 self .amrex_install_dir = "" # Cmake installation dir
436436 self .amrex_cmake_opts = ""
437437
438+ self .updateGitSubmodules = 0
439+
438440 self .MPIcommand = ""
439441 self .MPIhost = ""
440442
Original file line number Diff line number Diff line change 2828 isSuperbuild = < 0: pre-build AMReX and source (default)
2929 1: CMake downloads AMReX and needs separate configure & build >
3030
31+ updateGitSubmodules = < 0: don't update submodules when changing git branches (default)
32+ 1: run `git submodule update --init` after changing git branches >
33+
3134 sourceTree = < C_Src or AMReX >
3235
3336 suiteName = < descriptive name (i.e. Castro) >
You can’t perform that action at this time.
0 commit comments