From 58d5d58d996fce506a00cc6b689f53601ba6b501 Mon Sep 17 00:00:00 2001 From: Mathieu Courtois <mathieu.courtois@edf.fr> Date: Fri, 4 Jan 2019 15:41:31 +0100 Subject: [PATCH] [#28360] Limit checkings during submit for asterstudy, clean imports. --HG-- branch : edf/mc --- lib/hgaster/ascommands.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/hgaster/ascommands.py b/lib/hgaster/ascommands.py index 8fb860ff..3c1628c9 100644 --- a/lib/hgaster/ascommands.py +++ b/lib/hgaster/ascommands.py @@ -34,6 +34,7 @@ from .ext_utils import (check_for_updates, get_changed_files, get_description, parent_is_last, sendmail, shortrev, shortrev_s, valid_branch) from .request_queue import QueueError, Request, RequestQueue, requestkey +from .hooks.generic import OK cmdtable = {} command = cmdutil.command(cmdtable) @@ -582,7 +583,7 @@ class CandidateRevisionCheck(object): def check_single_head(self): """Check for single heads in branch.""" - from hooks.generic import OK, single_head_per_branch_hook + from hooks.generic import single_head_per_branch_hook checker = single_head_per_branch_hook() return checker(self.ui, self.repo, self.wrkrev) == OK @@ -1083,7 +1084,7 @@ class SubmitAsterXX(AbstractSubmitAster): def check_branch(self, dummy, branch): """Check branch validity.""" - from hooks.generic import OK, branch_checker + from hooks.generic import branch_checker return branch_checker('^asterxx/')(branch) == OK def accept_special_issue(self, issue_id): @@ -1136,7 +1137,6 @@ class SubmitDevtools(AbstractSubmit): def check_branch(self, dummy, branch): """Check branch validity.""" - from hooks.generic import OK from hooks.devtools import repo_branch_checker return repo_branch_checker(branch) == OK @@ -1166,16 +1166,11 @@ class SubmitAsterStudy(AbstractSubmitSmeca): command_lint = ["./check_lint.sh", "-p"] command_tests = [["./check_salome.sh", "-c"], ["./check_docs.sh"], - ["./check_comm2study.sh", "clean", "--jobs=4"], - ["./check_comm2code.sh", "clean", "--jobs=4"], - ["./check_persistence.sh", "clean", "--jobs=4"], - ["./check_performance.sh", "clean", "--jobs=4"], ] @staticmethod def check_branch(dummy, branch): """Check branch validity.""" - from hooks.generic import OK from hooks.asterstudy import repo_branch_checker return repo_branch_checker(branch) == OK @@ -1187,7 +1182,6 @@ class SubmitRTool(AbstractSubmitSmeca): @staticmethod def check_branch(dummy, branch): """Check branch validity.""" - from hooks.generic import OK from hooks.rtool import repo_branch_checker return repo_branch_checker(branch) == OK -- GitLab