Commit 35546fd4 authored by Elisabetta Giani's avatar Elisabetta Giani
Browse files

AT5-382: csp-lmc-mid project - Renamd EndSB in GoToIdle inside tests.

Some changes to linting configuration.
parent 6f52128a
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -19,18 +19,16 @@ test:
	retry --max=10 -- tango_admin --ping-device mid_csp/elt/subarray_01
	retry --max=10 -- tango_admin --ping-device mid_csp/elt/subarray_02
	cd /app && python setup.py test | tee setup_py_test.stdout
	mkdir -p /build/reports && \
	if [ -d /build ]; then \
		mv /app/setup_py_test.stdout /build/csp_master_setup_test.stdout; \
		mv /app/setup_py_test.stdout /build/mid_csp_lmc_setup_test.stdout; \
		mv /app/htmlcov /build/csp_master_htmlcov; \
		mv /app/coverage.xml /build/csp_master_coverage.xml; \
		mv /app/coverage.xml /build/mid_csp_lmc_coverage.xml; \
	fi;
lint:
	# pylint needs to run twice
	cd /app && pylint -f colorized csp_lmc_mid| tee code_analysis.stdout; \
	cd /app && pylint csp_lmc_mid > lint_output.xml; \
	if [ -d /build ]; then \
		mv /app/code_analysis.stdout /build/mid-csp-lmc_code_analysis.stdout; \
		mv /app/lint_output.xml /build/lint_output.xml; \
	fi;
	pip3 install pylint2junit; \
	mkdir -p /build/reports; \
	cd /app && pylint --output-format=parseable csp_lmc_mid | tee /build/code_analysis.stdout; \
	cd /app && pylint --output-format=pylint2junit.JunitReporter csp_lmc_mid > /build/reports/linting.xml;

.PHONY: all test lint
+5 −2
Original line number Diff line number Diff line
@@ -258,7 +258,10 @@ class TestCspSubarray(object):
        assert subarray_state == tango.DevState.ON
        f = open(file_path +"/test_ConfigureScan_basic.json")
        obs_state = midcsp_subarray01.obsState
        try:
            midcsp_subarray01.Configure(f.read().replace("\n", ""))
        except tango.DevFailed as tango_err:
            print("configure error:", tango_err.args[0].desc)
        obs_state = midcsp_subarray01.obsState
        f.close()
        time.sleep(5)
@@ -312,7 +315,7 @@ class TestCspSubarray(object):
        obs_state = midcsp_subarray01.obsState
        assert obs_state == ObsState.READY
        # command transition to IDLE
        midcsp_subarray01.EndSB()
        midcsp_subarray01.GoToIdle()
        time.sleep(3)
        obs_state = midcsp_subarray01.obsState
        assert obs_state == ObsState.IDLE