2016-03-04 18:39:10 -04:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Run container and start test execution
|
|
|
|
#
|
|
|
|
# License: according to LICENSE.md in the root directory of the PX4 Firmware repository
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ -z "$WORKSPACE" ]; then
|
|
|
|
echo "\$WORKSPACE not set"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-12-03 04:42:54 -04:00
|
|
|
IMAGE=px4io/px4-dev-ros:v1.0
|
|
|
|
|
2016-03-04 18:39:10 -04:00
|
|
|
# Pulling latest image
|
2016-04-20 12:23:05 -03:00
|
|
|
echo "===> pull latest Docker image"
|
2016-12-03 04:42:54 -04:00
|
|
|
docker pull $IMAGE
|
2016-04-20 12:23:05 -03:00
|
|
|
|
|
|
|
# removing some images might fail
|
|
|
|
set +e
|
|
|
|
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
|
|
|
|
set -e
|
|
|
|
echo "<==="
|
2016-03-04 18:39:10 -04:00
|
|
|
|
|
|
|
#
|
|
|
|
# Running SITL testing container
|
|
|
|
# Assuming that necessary source projects, including this one, are cloned in the build server workspace of this job.
|
|
|
|
#
|
|
|
|
echo "===> run container"
|
2016-12-03 04:42:54 -04:00
|
|
|
docker run --rm -v "$WORKSPACE:/job:rw" $IMAGE bash "/job/Firmware/integrationtests/run_tests.bash" /job/Firmware
|
2016-03-04 18:39:10 -04:00
|
|
|
echo "<==="
|