Skip to content
Snippets Groups Projects
Commit 4dc08d6e authored by Corné Lukken's avatar Corné Lukken
Browse files

Managed to have files functional in same directory

parent f9155c9b
No related branches found
No related tags found
1 merge request!58L2SS-259: Integrate unit tests using Continuous Integration (CI)
image: artefact.skatelescope.org/ska-tango-images/tango-itango:9.3.3.7 image: artefact.skatelescope.org/ska-tango-images/tango-itango:9.3.3.7
variables: variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PBR_VERSION: "0.1"
cache: cache:
paths: paths:
- .cache/pip - .cache/pip
- .tox - .tox
before_script: #before_script:
- pip install tox # - pip install tox
stages: stages:
- linting - linting
- unit-tests - unit-tests
...@@ -15,8 +14,10 @@ linting: ...@@ -15,8 +14,10 @@ linting:
stage: linting stage: linting
allow_failure: true allow_failure: true
script: script:
- cd devices
- tox -e pep8 - tox -e pep8
unit_test: unit_test:
stage: unit-tests stage: unit-tests
script: script:
- cd devices
- tox -e py37 - tox -e py37
\ No newline at end of file
[DEFAULT] [DEFAULT]
test_path=./devices/test test_path=./test
top_dir=./ top_dir=./
\ No newline at end of file
import pbr.version from util.lofar_git import get_version
__version__ = pbr.version.VersionInfo( __version__ = get_version()
'TangoStationControl').version_string()
# from ._version import get_versions
# __version__ = get_versions()['version']
# del get_versions
File moved
...@@ -24,10 +24,10 @@ classifier = ...@@ -24,10 +24,10 @@ classifier =
[files] [files]
packages = packages =
devices ./
[entry_points] [entry_points]
console_scripts = console_scripts =
SDP = devices.SDP:main SDP = SDP:main
PCC = devices.PCC:main PCC = PCC:main
import setuptools
setuptools.setup(setup_requires=['pbr>=2.0.0'], pbr=True)
...@@ -5,11 +5,8 @@ ...@@ -5,11 +5,8 @@
coverage>=5.2.0 # Apache-2.0 coverage>=5.2.0 # Apache-2.0
doc8>=0.8.0 # Apache-2.0 doc8>=0.8.0 # Apache-2.0
hacking>=3.2.0,<3.3.0 # Apache-2.0 hacking>=3.2.0,<3.3.0 # Apache-2.0
#mypy>=0.812 # MIT
python-subunit>=1.4.0 # Apache-2.0/BSD python-subunit>=1.4.0 # Apache-2.0/BSD
Pygments>=2.6.0 Pygments>=2.6.0
#oslotest>=4.4.0 # Apache-2.0
#oslo.messaging>=12.2.0 # Apache-2.0
stestr>=3.0.0 # Apache-2.0 stestr>=3.0.0 # Apache-2.0
testscenarios>=0.5.0 # Apache-2.0/BSD testscenarios>=0.5.0 # Apache-2.0/BSD
testtools>=2.4.0 # MIT testtools>=2.4.0 # MIT
......
...@@ -7,10 +7,11 @@ ...@@ -7,10 +7,11 @@
# Distributed under the terms of the APACHE license. # Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info. # See LICENSE.txt for more info.
import unittest
import testscenarios import testscenarios
class BaseTestCase(testscenarios.WithScenarios): class BaseTestCase(testscenarios.WithScenarios, unittest.TestCase):
"""Test base class.""" """Test base class."""
def setUp(self): def setUp(self):
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
# Distributed under the terms of the APACHE license. # Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info. # See LICENSE.txt for more info.
from devices.SDP import SDP from SDP import SDP
from devices.test import base from test import base
class TestSDP(base.TestCase): class TestSDP(base.TestCase):
......
...@@ -14,11 +14,11 @@ setenv = ...@@ -14,11 +14,11 @@ setenv =
OS_STDERR_CAPTURE=1 OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60 OS_TEST_TIMEOUT=60
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/docker-compose/lofar-device-base/lofar-requirements.txt -r{toxinidir}/../docker-compose/lofar-device-base/lofar-requirements.txt
commands = stestr run {posargs} commands = stestr run {posargs}
[testenv:pep8] [testenv:pep8]
commands = commands =
; doc8 doc/source/ README.rst ; doc8 doc/source/ README.rst
flake8 devices/{posargs} flake8 ./{posargs}
bandit -r devices -x test -n5 -ll # -s B320 bandit -r ./ -x test -n5 -ll # -s B320
\ No newline at end of file \ No newline at end of file
import setuptools
setuptools.setup(setup_requires=['pbr>=2.0.0'], pbr=True)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment