1 # ==================================================================================
2 # Copyright (c) 2020-2023 Nordix
3 # Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # ==================================================================================
19 envlist = code,docs,docs-linkcheck
23 ; basic test and coverage jobs
34 TESTS_BASE_PATH = {toxinidir}/near-rt-ric-simulator/tests
36 ; Two test execution with pytest is needed as each simulator version need to be started separately. In addtion, each simulator need
37 ; environment setup that would cause interference if both simulator are executed in the same pytest run.
38 ; Each pytest run also need to point to the specific test case file for the reasons mentioned above.
39 ; Note that the second pytest (additional pytest added in the future) uses the 'append' flag to combine the coverage data
40 ; from the previous tests. The first pytest shall not have the 'append' since the it is supposed to erase previous coverage data
41 ; from earlier tox run.
42 pytest -o log_cli=true --cov {toxinidir}/near-rt-ric-simulator --cov-report xml --cov-report term-missing --cov-report html --cov-fail-under=70 \
43 {toxinidir}/near-rt-ric-simulator/tests/test_osc_2_1_0.py
44 pytest -o log_cli=true --cov-append --cov {toxinidir}/near-rt-ric-simulator --cov-report xml --cov-report term-missing --cov-report html \
45 --cov-fail-under=70 {toxinidir}/near-rt-ric-simulator/tests/test_std_1_1_3.py
46 pytest -o log_cli=true --cov-append --cov {toxinidir}/near-rt-ric-simulator --cov-report xml --cov-report term-missing --cov-report html \
47 --cov-fail-under=70 {toxinidir}/near-rt-ric-simulator/tests/test_std_2_0_0.py
52 allowlist_externals = echo
54 deps = -r{toxinidir}/docs/requirements-docs.txt
56 sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
57 echo "Generated docs available in {toxinidir}/docs/_build/html"
59 [testenv:docs-linkcheck]
62 deps = -r{toxinidir}/docs/requirements-docs.txt
64 sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck