From: smahana123 Date: Tue, 6 Dec 2022 09:32:10 +0000 (+0530) Subject: Addition of tox and conftest.py file. X-Git-Tag: 1.0.0~10 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=0d807754bffe206fadce0853df25de8d35064f53;p=aiml-fw%2Fawmf%2Ftm.git Addition of tox and conftest.py file. Issue-Id: AIMLFW-6 Signed-off-by: smahana123 Change-Id: Ia0bbc2cd162ee60dec0526966516bfb3372adaca Signed-off-by: smahana123 --- diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..0752ea4 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,25 @@ +# ================================================================================== +# +# Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ================================================================================== +# +import pytest + +from trainingmgr.common.tmgr_logger import TMLogger + +def pytest_configure(): + pytest.logger = TMLogger("tests/common/conf_log.yaml").logger + diff --git a/tox.ini b/tox.ini index dd4c5bb..ead2267 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ # ================================================================================== -# Copyright (c) 2022 Nordix +# +# Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,9 +13,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # ================================================================================== # - [tox] envlist = code skipsdist = true @@ -44,10 +45,10 @@ setenv = cd = {toxinidir}/tests commands = pip3 install {toxinidir} - git clone "https://gerrit.o-ran-sc.org/r/aiml-fw/athp/sdk/feature-store" - git clone "https://gerrit.o-ran-sc.org/r/aiml-fw/athp/sdk/model-storage" + git clone "https://gerrit.o-ran-sc.org/r/aiml-fw/athp/sdk/feature-store" /tmp/fssdk/ + git clone "https://gerrit.o-ran-sc.org/r/aiml-fw/athp/sdk/model-storage" /tmp/modelsdk/ - pip3 install feature-store/. - pip3 install model-storage/. + pip3 install /tmp/fssdk/. + pip3 install /tmp/modelsdk/. pytest --cov {toxinidir}/trainingmgr --cov-report xml --cov-report term-missing --cov-report html --cov-fail-under=10 --junitxml=/tmp/tests.xml coverage xml -i \ No newline at end of file