Commit 5bbad928 authored by Elisabetta Giani's avatar Elisabetta Giani
Browse files

Add test-harnes directory for csp-lmc-common package.

Modified csp-lmc-mid Dockerfile to use tango USER.
Enabled logs for tests on csp-mid-lmc to understand tests failures.
parent 90bdf93d
Loading
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
# Use bash shell with pipefail option enabled so that the return status of a
# piped command is the value of the last (rightmost) commnand to exit with a
# non-zero status. This lets us pipe output into tee but still exit on test
# failures.
SHELL = /bin/bash
.SHELLFLAGS = -o pipefail -c

all: test 

# wait for the device to be available before beginning the test
# A temporary volume is mounted at /build when 'make test' is executing.
# The following steps copy across useful output to this volume which can
# then be extracted to form the CI summary for the test procedure.
test:
	retry --max=10 -- tango_admin --ping-device mid_csp_cbf/sub_elt/master
	retry --max=10 -- tango_admin --ping-device mid_csp_cbf/sub_elt/subarray_01
	retry --max=10 -- tango_admin --ping-device mid_csp_cbf/sub_elt/subarray_02
	retry --max=10 -- tango_admin --ping-device common/elt/master
	retry --max=10 -- tango_admin --ping-device common/elt/subarray_01
	retry --max=10 -- tango_admin --ping-device common/elt/subarray_02
	cd /app && python setup.py test 
.PHONY: all test 
+3 −0
Original line number Diff line number Diff line
This directory is uploaded to the container when 'make test' is executed. Files
in this directory will be found inside /build once uploaded to the container.
+0 −1
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@ FROM nexus.engageska-portugal.pt/ska-docker/ska-python-runtime:latest AS runtime
# create ipython profile to so that itango doesn't fail if ipython hasn't run yet
RUN ipython profile create
#install lmc-base-classes
USER root

#RUN DEBIAN_FRONTEND=noninteractive pip3 install https://nexus.engageska-portugal.pt/repository/pypi/packages/ska-logging/0.2.1/ska_logging-0.2.1.tar.gz
#RUN DEBIAN_FRONTEND=noninteractive pip3 install https://nexus.engageska-portugal.pt/repository/pypi/packages/lmcbaseclasses/0.4.1+14ff4f1b/lmcbaseclasses-0.4.1+14ff4f1b.tar.gz
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ test: build up ## test the application
	$(call make,test); \
	  status=$$?; \
	  rm -fr build; \
          #docker-compose $(COMPOSE_FILE_ARGS) logs;
          docker-compose $(COMPOSE_FILE_ARGS) logs;
	  docker cp $(BUILD):/build .; \
	  docker rm -f -v $(BUILD); \
	  $(MAKE) down; \