Select Git revision
run_integration_test.sh
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
run_integration_test.sh 1.46 KiB
#!/bin/bash -e
if [ -z "$LOFAR20_DIR" ]; then
# We assume we aren't in the PATH, so we can derive our path.
# We need our parent directory.
LOFAR20_DIR_RELATIVE=$(dirname "$0")/..
# As an absolute path
LOFAR20_DIR=$(readlink -f "${LOFAR20_DIR_RELATIVE}")
fi
cd "$LOFAR20_DIR/docker-compose" || exit 1
# Make sure builds are recent, and use our building parameters.
make build
# Start and stop sequence
make stop device-sdp device-recv device-sst device-unb2 device-xst sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim
make start databaseds dsconfig elk
# Give dsconfig and databaseds time to start
sleep 60
# Update the dsconfig
# Do not remove `bash`, otherwise statement ignored by gitlab ci shell!
bash "${LOFAR20_DIR}"/sbin/update_ConfigDb.sh "${LOFAR20_DIR}"/CDB/LOFAR_ConfigDb.json
bash "${LOFAR20_DIR}"/sbin/update_ConfigDb.sh "${LOFAR20_DIR}"/CDB/stations/simulators_ConfigDb.json
cd "$LOFAR20_DIR/docker-compose" || exit 1
make start sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim
# Give the simulators time to start
sleep 5
make start device-sdp device-recv device-sst device-unb2 device-xst
# Give devices time to restart
# TODO(Corne Lukken): Use a nicer more reliable mechanism
sleep 60
# Start the integration test
cd "$LOFAR20_DIR/docker-compose" || exit 1
make start integration-test
# Give devices time to restart
sleep 60
# Run the integration test with the output displayed on stdout
docker start -a "${CONTAINER_NAME_PREFIX}"integration-test