From b920afa77bc9f7063d948bb437f378a0803b40fc Mon Sep 17 00:00:00 2001 From: Mathieu Courtois <mathieu.courtois@edf.fr> Date: Fri, 16 Nov 2018 10:17:18 +0100 Subject: [PATCH] [#28196] Add support of data/validation for code_aster++. --HG-- branch : edf/mc --- bin/install_env | 30 ++++++++++++++++++++++++++++++ lib/aslint/filetype.py | 2 +- lib/aslint/test/test_checkers.py | 5 +++-- lib/hgaster/ascommands.py | 2 +- lib/hgaster/ext_utils.py | 5 ++++- 5 files changed, 39 insertions(+), 5 deletions(-) diff --git a/bin/install_env b/bin/install_env index 988458f6..c9b41faa 100755 --- a/bin/install_env +++ b/bin/install_env @@ -112,12 +112,42 @@ class DataParameters(SrcParameters): revid = "08ee4973b18c" +class DataXXParameters(DataParameters): + """Parameters for a configuration of 'data' repository for code_aster++.""" + repo_pull = "codeaster-a12da" + repo_push = None + repo_ci = "jenkins" + identification = "asterdev:asterdev" + revid = "c6b122a7a53e" + + def reponame_for(self, what): + """Return the repository path for different actions.""" + if what != "ci": + return super(DataXXParameters, self).reponame_for(what) + return self.repo_ci + "/data-xx" + + class ValidationParameters(SrcParameters): """Parameters for a configuration of 'data' repository for code_aster.""" base = "validation" revid = "8918a03f384f" +class ValidationXXParameters(DataParameters): + """Parameters for a configuration of 'data' repository for code_aster++.""" + repo_pull = "codeaster-a12da" + repo_push = None + repo_ci = "jenkins" + identification = "asterdev:asterdev" + revid = "54d590227bd7" + + def reponame_for(self, what): + """Return the repository path for different actions.""" + if what != "ci": + return super(ValidationXXParameters, self).reponame_for(what) + return self.repo_ci + "/validation-xx" + + class DevtoolsParameters(ConfigurationParameters): """Parameters for a configuration of the repository for 'devtools'.""" base = "devtools" diff --git a/lib/aslint/filetype.py b/lib/aslint/filetype.py index dfa7f6b6..439d2f97 100644 --- a/lib/aslint/filetype.py +++ b/lib/aslint/filetype.py @@ -10,7 +10,7 @@ import re _types = [ ('build', re.compile(r'^(?:|\./)(waf|waf_.*|waf\.(engine|main)|waftools/.*' r'|wafcfg/.*|.*wscript)$')), - ('test', re.compile(r'^(?:|\./)astest/')), + ('test', re.compile(r'^(?:|\./)(astest|tests_data)/')), ('hxx', re.compile(r'^(?:|\./)bibcxx/.*\.h$')), ('cxx', re.compile(r'\.cxx$')), ('h', re.compile(r'^(?:|\./)bibc/.*\.h$')), diff --git a/lib/aslint/test/test_checkers.py b/lib/aslint/test/test_checkers.py index 8a4fd435..e840ba50 100644 --- a/lib/aslint/test/test_checkers.py +++ b/lib/aslint/test/test_checkers.py @@ -65,7 +65,8 @@ class InvalidFilenameTestsData(FilenameCat, TextMsgNotFound): """ id = "C2019" fmt = "%(id)s: %(label)s" - apply_ctxt = CheckContext(reponame=('data', )) + apply_ctxt = CheckContext(reponame=('data', ), + branch='^(default|v[0-9]+)') def search(self, txt): """Check for unauthorized filenames.""" @@ -518,7 +519,7 @@ class RequiredKeyword(FileContentCat, GenericMsg): A testcase must use one of operators DEBUT or POURSUITE and the keyword CODE.""" apply_to = COMM_EXT - apply_ctxt = CheckContext(branch=['default']) + apply_ctxt = CheckContext(reponame=['src'], branch='^(default|asterxx)') id = 'C2011' _debut = re.compile('^DEBUT', re.M) _debcod = re.compile("^DEBUT *\([^\#]*CODE *= *_F\(", re.M) diff --git a/lib/hgaster/ascommands.py b/lib/hgaster/ascommands.py index bedbe026..01833b66 100644 --- a/lib/hgaster/ascommands.py +++ b/lib/hgaster/ascommands.py @@ -111,7 +111,7 @@ def submit(ui, repo, *args, **opts): class_ = SubmitDevtools elif reponame in ("data", "src", "validation"): class_ = SubmitAster - elif reponame == "src-xx": + elif reponame in ("data-xx", "src-xx", "validation-xx"): class_ = SubmitAsterXX elif reponame == "salome-codeaster-study": class_ = SubmitAsterStudy diff --git a/lib/hgaster/ext_utils.py b/lib/hgaster/ext_utils.py index eee1ab20..d61731d8 100644 --- a/lib/hgaster/ext_utils.py +++ b/lib/hgaster/ext_utils.py @@ -20,11 +20,14 @@ RE_ISSUE = r'(?P<issue>(?P<type>\#|issue|Issue|bb|BB)(?: ?)(?P<number>[0-9]{4,6} BUGTRACKERS = (None, 'rex', 'bitbucket') # closed issues must be enclosed by '[]': [#1234] -# identifier of the repositories (hash of revision 0) +# identifier of the repositories (hash of revision 0 or of the revision that +# opens the branch for derivated repository) REPOID = OrderedDict([ + ('c6b122a7a53ea4f82f2e4b198e1357f426d66f71', 'data-xx'), ('08ee4973b18cc37bc89a3ed356b91397a352b9c1', 'data'), ('852b9b2bfbed59991756733f65ca422a08df5383', 'src-xx'), ('becdb3e46d91de04ce69a240b714ec9df3a50826', 'src'), + ('54d590227bd7012028615e8be14866b8e22174e3', 'validation-xx'), ('8918a03f384fdd666260a381d5dad564ec0a177d', 'validation'), ('d9ffe8b5560b5799cf9821b9c08d0f6f41497dee', 'devtools'), ('ee137aec1fe656351ca17b42751f2a0de5f157f0', 'salome-codeaster-study'), -- GitLab