diff --git a/devices/integration_test/README.md b/devices/integration_test/README.md index a94aa174badfe5b44ccab770dd8437106c432ad3..6609a2da61665aab3d93c9f4d716148e03428fba 100644 --- a/devices/integration_test/README.md +++ b/devices/integration_test/README.md @@ -16,8 +16,7 @@ are running and are in the required state. **Warning running these tests will make changes to your CDB database config!** ```shell -source bootstrap/etc/lofar20rc.sh -$LOFAR20_DIR/sbin/run_integration_test.sh +sbin/run_integration_test.sh ``` ## Limitations diff --git a/devices/test/README.md b/devices/test/README.md index 4007ef0a30b75869e04b0e69745947f73d4520ba..050b1de05d9206151661aabd11a77358ab464576 100644 --- a/devices/test/README.md +++ b/devices/test/README.md @@ -120,7 +120,7 @@ Docker container. A simple interactive Docker exec is enough to access them: ```sh docker exec -it device-sdp /bin/bash -cd /opt/lofar2.0/tango/devices/ +cd /opt/lofar/tango/devices/ tox ``` diff --git a/sbin/run_integration_test.sh b/sbin/run_integration_test.sh index 684e7584ee20fb22803b9d3e8e29537f52f52aff..3b7c09e511a26be4e2c403acb1ed557e8046b463 100755 --- a/sbin/run_integration_test.sh +++ b/sbin/run_integration_test.sh @@ -1,9 +1,12 @@ #!/bin/bash -# Check if lofar20rc.sh is sourced and environment variables are set. -if [ -z "$LOFAR20_DIR" ]; then - echo "\$LOFAR20_DIR is unset or blank, is lofar20rc.sh sourced correctly?" - exit 1 +if [ -z "$LOFA20_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 # Start and stop sequence @@ -15,7 +18,6 @@ make start databaseds dsconfig jupyter elk sleep 15 # Update the dsconfig -cd "$TANGO_LOFAR_LOCAL_DIR" || exit 1 sbin/update_ConfigDb.sh CDB/integration_ConfigDb.json cd "$LOFAR20_DIR/docker-compose" || exit 1