diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0dc48fd587e6d9b27d44a369af86339881e72085..2ede84fb8034b428c0edd71196f8f99c02355fb1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -361,6 +361,15 @@ bandit: script: - cd tangostationcontrol - tox -e bandit +xenon: + stage: static-analysis + allow_failure: true + before_script: + - sudo apt-get update + - sudo apt-get install -y git + script: + - cd tangostationcontrol + - tox -e xenon shellcheck: stage: static-analysis before_script: diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/xst.py b/tangostationcontrol/tangostationcontrol/devices/sdp/xst.py index c0b6f7a98894b7c7d660828231935b63c5b0f5da..3b0f59d242c7d29ac707b7e7361d2e9dce706424 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/xst.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/xst.py @@ -108,8 +108,8 @@ class XST(Statistics): FPGA_xst_subband_select_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_subband_select_RW"], datatype=numpy.uint32, dims=(8,16), access=AttrWriteType.READ_WRITE) FPGA_xst_subband_select_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_subband_select_R"], datatype=numpy.uint32, dims=(8,16)) - FPGA_xst_offload_nof_crosslets_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_offload_nof_crosslets_RW"], datatype=numpy.uint32, dims=(16,), access=AttrWriteType.READ_WRITE) - FPGA_xst_offload_nof_crosslets_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_offload_nof_crosslets_R"], datatype=numpy.uint32, dims=(16,)) + FPGA_xst_offload_nof_crosslets_RW = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_offload_nof_crosslets_RW"], datatype=numpy.uint32, dims=(16,), access=AttrWriteType.READ_WRITE) + FPGA_xst_offload_nof_crosslets_R = attribute_wrapper(comms_id=OPCUAConnection, comms_annotation=["FPGA_xst_offload_nof_crosslets_R"], datatype=numpy.uint32, dims=(16,)) # number of packets with valid payloads nof_valid_payloads_R = attribute_wrapper(comms_id=StatisticsClient, comms_annotation={"type": "statistics", "parameter": "nof_valid_payloads"}, dims=(XSTCollector.MAX_FPGAS,), datatype=numpy.uint64) diff --git a/tangostationcontrol/test-requirements.txt b/tangostationcontrol/test-requirements.txt index 16a9033db5279a246609fdc0f9c941d26c74792a..6912d81e2f87f715129b5b930b27e405fd67675d 100644 --- a/tangostationcontrol/test-requirements.txt +++ b/tangostationcontrol/test-requirements.txt @@ -17,3 +17,4 @@ stestr>=3.0.0 # Apache-2.0 testscenarios>=0.5.0 # Apache-2.0/BSD testtools>=2.4.0 # MIT timeout-decorator>=0.5 # MIT +xenon>=0.8.0 # MIT diff --git a/tangostationcontrol/tox.ini b/tangostationcontrol/tox.ini index fc0876dd08ba604c5d112e541ef14f5ea04c96c4..dfc7581043c622a043da293fcedd59c589847e52 100644 --- a/tangostationcontrol/tox.ini +++ b/tangostationcontrol/tox.ini @@ -66,6 +66,10 @@ commands = commands = bandit -r devices/ -n5 -ll -s B104 +[testenv:xenon]; +commands = + xenon tangostationcontrol -b B -m A -a A + [testenv:docs] deps = -r{toxinidir}/../docker-compose/lofar-device-base/lofar-requirements.txt