From b3b0abe6c16e629af8439cc791ed7ca91c950bab Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 7 Nov 2022 08:51:56 +1100 Subject: [PATCH] Tools: bisect_helper.py: update submodules when bisecting build --- Tools/autotest/bisect-helper.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Tools/autotest/bisect-helper.py b/Tools/autotest/bisect-helper.py index 17dbd02c3d..e0da93182e 100755 --- a/Tools/autotest/bisect-helper.py +++ b/Tools/autotest/bisect-helper.py @@ -170,6 +170,13 @@ class Bisect(object): else: self.exit_fail() + def update_submodules(self): + try: + self.run_program("Update submodules", + ["git", "submodule", "update", "--init", "--recursive"]) + except subprocess.CalledProcessError: + self.exit_abort() + class BisectBuild(Bisect): @@ -177,6 +184,7 @@ class BisectBuild(Bisect): super(BisectBuild, self).__init__(opts) def run(self): + self.update_submodules() self.build() # may exit with skip or fail self.exit_pass() @@ -211,11 +219,7 @@ class BisectCITest(Bisect): if self.opts.autotest_branch is None: raise ValueError("expected autotest branch") - try: - self.run_program("Update submodules", - ["git", "submodule", "update", "--init", "--recursive"]) - except subprocess.CalledProcessError: - self.exit_abort() + self.update_submodules() try: self.run_program("Check autotest directory out from master",