diff --git a/csp-lmc-common/.gitlab-ci.yml b/csp-lmc-common/.gitlab-ci.yml index c979fe13fc0b409b9db73b956deca5e473988cf8..3535b76d2bdf7b5a5822e4f10124aa69909bfd3c 100644 --- a/csp-lmc-common/.gitlab-ci.yml +++ b/csp-lmc-common/.gitlab-ci.yml @@ -77,8 +77,8 @@ test:csp-lmc-common: - cd $COMMON_BUILD_PATH - pwd - python3 -m pip install -r requirements-tst.txt - - python3 -m pip install --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple -r requirements.txt - - python3 setup.py test |tee setup_py_test.stdout + - python3 -m pip install --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple -r requirements.txt . + - pytest tests |tee setup_py_test.stdout - pwd - mkdir -p build/reports - ls -alR @@ -131,9 +131,6 @@ linting:csp-lmc-common: script: - cd $BUILD_PATH - twine upload --repository-url $PYPI_REPOSITORY_URL dist/* || true - only: # publish development package only when source code changes - changes: - - "**/*.py" .publish_python_release_common: extends: .publish_python_common diff --git a/csp-lmc-common/requirements.txt b/csp-lmc-common/requirements.txt index a0e04f8e5594fe4e2e37a6f8e0ae3790d1c094a1..e302923ee06c4463cfba542ad40e4ee8640c142a 100644 --- a/csp-lmc-common/requirements.txt +++ b/csp-lmc-common/requirements.txt @@ -2,5 +2,4 @@ numpy == 1.17.2 pytango >= 9.3.2 jsonschema >= 3.2.0 lmcbaseclasses >= 0.7.2 -ska-skuid ska-log-transactions diff --git a/csp-lmc-common/setup.py b/csp-lmc-common/setup.py index d2ac7bfe7eedbf15ff87e242108c9c403a842f6d..aa15c8fd487e0b43876392bcfd7651eb6ee0082c 100644 --- a/csp-lmc-common/setup.py +++ b/csp-lmc-common/setup.py @@ -40,8 +40,7 @@ setup( 'pytango >9.3.1', 'future', 'lmcbaseclasses', - 'ska-log-transactions', - 'ska-skuid>=1.2.0' + 'ska-log-transactions' ], dependency_links=[ 'https://nexus.engageska-portugal.pt/repository/pypi/simple' diff --git a/csp-lmc-mid/.make/k8s.mk b/csp-lmc-mid/.make/k8s.mk index 71c7b395acb85db5dbc5dfdc2f74a1b98ca49a32..2d8834390ebfcfa93a3ca00b905ba88e58bdcd36 100644 --- a/csp-lmc-mid/.make/k8s.mk +++ b/csp-lmc-mid/.make/k8s.mk @@ -229,7 +229,7 @@ k8s_test = tar -c . | \ --image-pull-policy=IfNotPresent \ --image=$(IMAGE_TO_TEST) -- \ /bin/bash -c "tar xv --strip-components 1 --warning=all && \ - python3 -m pip install . &&\ + python3 -m pip install -r requirements-tst.txt . && \ cd test-harness &&\ make TANGO_HOST=$(TANGO_HOST) $1 && \ tar -czvf /tmp/build.tgz build && \ diff --git a/csp-lmc-mid/requirements-tst.txt b/csp-lmc-mid/requirements-tst.txt index 67c373bcd3793c3ec93885ff62ecd7ce775c1619..147dc97f664e90abf15bb05767b25c50f9d8ba1d 100644 --- a/csp-lmc-mid/requirements-tst.txt +++ b/csp-lmc-mid/requirements-tst.txt @@ -3,7 +3,8 @@ pytest-bdd pytest-cov pytest-json-report pytest-mock -#pytest-xdist == 1.34.0 +pytest-forked pycodestyle coverage mock +assertpy diff --git a/csp-lmc-mid/setup.cfg b/csp-lmc-mid/setup.cfg index d7e22e16a99e6cb4645257562dec1326243901a2..4113b6db2ec86aef38e9cd6dc9bc2c6be825b323 100644 --- a/csp-lmc-mid/setup.cfg +++ b/csp-lmc-mid/setup.cfg @@ -14,12 +14,8 @@ source = csp-lmc-mid [tool:pytest] testpaths = tests -log_cli = True -log_cli_level = INFO -log_file = pytest-logs.txt -log_file_level = INFO addopts = --forked - --verbose + --verbose --cov=csp_lmc_mid --json-report --json-report-file=htmlcov/report.json diff --git a/csp-lmc-mid/test-harness/Makefile b/csp-lmc-mid/test-harness/Makefile index 60db74e1cb46ae09cc74e5ab967fb6f24a9728ea..bb172a34963f4e093e8c1064c426278997cfef64 100644 --- a/csp-lmc-mid/test-harness/Makefile +++ b/csp-lmc-mid/test-harness/Makefile @@ -17,7 +17,7 @@ test: retry --max=15 -- tango_admin --ping-device mid_csp/elt/master retry --max=15 -- tango_admin --ping-device mid_csp/elt/subarray_01 retry --max=15 -- tango_admin --ping-device mid_csp/elt/subarray_02 - cd /app && python3 setup.py test| tee integration-test.stdout + cd /app && pytest tests| tee integration-test.stdout mkdir -p build/reports && \ if [ -d build ]; then \ mv /app/integration-test.stdout ./build/csp-lmc-mid-setup-test.stdout; \