Addition of tox and conftest.py file. 69/9969/2
authorsmahana123 <s.mahana@samsung.com>
Tue, 6 Dec 2022 09:32:10 +0000 (15:02 +0530)
committersmahana123 <s.mahana@samsung.com>
Tue, 6 Dec 2022 09:43:41 +0000 (15:13 +0530)
Issue-Id: AIMLFW-6

Signed-off-by: smahana123 <s.mahana@samsung.com>
Change-Id: Ia0bbc2cd162ee60dec0526966516bfb3372adaca
Signed-off-by: smahana123 <s.mahana@samsung.com>
tests/conftest.py [new file with mode: 0644]
tox.ini

diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644 (file)
index 0000000..0752ea4
--- /dev/null
@@ -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 (file)
--- 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