From 15428329e5bf42931e83d41e32a395e8063b8d8a Mon Sep 17 00:00:00 2001 From: Pierre Grandin Date: Sat, 31 Dec 2016 18:50:07 -0800 Subject: Moving linux tests to a script CircleCI parallelism does not guarantee that tests will run reliably on the same containers. This is causing issues for the linux tests, previously defined in the post section, that need to run on the same container as the linux build. --- ci/build_linux.sh | 4 ++++ ci/run_linux_tests.sh | 18 ++++++++++++++++++ circle.yml | 16 ---------------- 3 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 ci/run_linux_tests.sh diff --git a/ci/build_linux.sh b/ci/build_linux.sh index 3fb730dca..d0712d52c 100644 --- a/ci/build_linux.sh +++ b/ci/build_linux.sh @@ -34,3 +34,7 @@ fi if [[ "$CIRCLE_ARTIFACTS" != "" ]]; then cp -r navit/xpm $CIRCLE_ARTIFACTS fi + + +# Done with the builds tests. Running some app tests +bash run_linux_tests.sh diff --git a/ci/run_linux_tests.sh b/ci/run_linux_tests.sh new file mode 100644 index 000000000..c34ea0bfb --- /dev/null +++ b/ci/run_linux_tests.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e + +pushd ~/linux-bin/navit/ +sed -i -e 's@name="Local GPS" profilename="car" enabled="yes" active="1"@name="Local GPS" profilename="car" enabled="no" active="0"@' navit.xml +sed -i -e 's@name="Demo" profilename="car" enabled="no" active="yes"@name="Demo" profilename="car" enabled="yes" active="yes" follow="1" refresh="1"@' navit.xml +sed -i -e 's@type="internal" enabled@type="internal" fullscreen="1" font_size="350" enabled@' navit.xml +sed -i -e 's@libbinding_dbus.so" active="no"@libbinding_dbus.so" active="yes"@' navit.xml + +./navit & +pid=$! + +import -window root $CIRCLE_ARTIFACTS/default.png + +python ~/navit/ci/dbus_tests.py $CIRCLE_TEST_REPORTS/ + +dbus-send --print-reply --session --dest=org.navit_project.navit /org/navit_project/navit/default_navit org.navit_project.navit.navit.quit diff --git a/circle.yml b/circle.yml index 9ff4ee7a9..4b296a25c 100644 --- a/circle.yml +++ b/circle.yml @@ -30,22 +30,6 @@ test: parallel: true files: - ci/build_*.sh - post: - - sed -i -e 's@name="Local GPS" profilename="car" enabled="yes" active="1"@name="Local GPS" profilename="car" enabled="no" active="0"@' navit.xml: - pwd: ~/linux-bin/navit/ - - sed -i -e 's@name="Demo" profilename="car" enabled="no" active="yes"@name="Demo" profilename="car" enabled="yes" active="yes" follow="1" refresh="1"@' navit.xml: - pwd: ~/linux-bin/navit/ - - sed -i -e 's@type="internal" enabled@type="internal" fullscreen="1" font_size="350" enabled@' navit.xml: - pwd: ~/linux-bin/navit/ - - sed -i -e 's@libbinding_dbus.so" active="no"@libbinding_dbus.so" active="yes"@' navit.xml: - pwd: ~/linux-bin/navit/ - - ./navit: - pwd: ~/linux-bin/navit/ - background: true - - sleep 5 - - import -window root $CIRCLE_ARTIFACTS/default.png - - python ci/dbus_tests.py $CIRCLE_TEST_REPORTS/ - - dbus-send --print-reply --session --dest=org.navit_project.navit /org/navit_project/navit/default_navit org.navit_project.navit.navit.quit deployment: merge_into_master: branch: trunk -- cgit v1.2.1