diff --git a/integration/run_integration_tests b/integration/run_integration_tests new file mode 100755 index 00000000..840011cc --- /dev/null +++ b/integration/run_integration_tests @@ -0,0 +1,13 @@ +#!/bin/bash +set -ex + +_dir="$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)" +_release=$(lsb_release -cs) + +if [[ "${_release}" == "bionic" ]]; then + echo "Running Bionic (18:04) integration tests" + exec ${_dir}/run_integration_tests-18-04 +else + echo "Running Xenial (16:04) integration tests" + exec ${_dir}/run_integration_tests-16-04 +fi diff --git a/run_integration_tests-16-04 b/integration/run_integration_tests-16-04 similarity index 92% rename from run_integration_tests-16-04 rename to integration/run_integration_tests-16-04 index c1467db2..e105330f 100755 --- a/run_integration_tests-16-04 +++ b/integration/run_integration_tests-16-04 @@ -17,6 +17,6 @@ lxc exec $CONTAINER_NAME -- lxc config set core.https_address [::] lxc exec $CONTAINER_NAME -- mkdir -p /opt/pylxd # NOTE: rockstar (13 Sep 2016) - --recursive is not supported in lxd <2.1, so # until we have pervasive support for that, we'll do this tar hack. -tar cf - * .git | lxc exec $CONTAINER_NAME -- tar xf - -C /opt/pylxd +cd .. && tar cf - ../* ../.git | lxc exec $CONTAINER_NAME -- tar xf - -C /opt/pylxd lxc exec $CONTAINER_NAME -- /bin/sh -c "cd /opt/pylxd && tox -eintegration" lxc delete --force $CONTAINER_NAME diff --git a/run_integration_tests-18-04 b/integration/run_integration_tests-18-04 similarity index 95% rename from run_integration_tests-18-04 rename to integration/run_integration_tests-18-04 index 00980f84..99e00fd1 100755 --- a/run_integration_tests-18-04 +++ b/integration/run_integration_tests-18-04 @@ -31,6 +31,6 @@ lxc exec $CONTAINER_NAME -- lxc profile device add default root disk path=/ pool lxc exec $CONTAINER_NAME -- mkdir -p /opt/pylxd # NOTE: rockstar (13 Sep 2016) - --recursive is not supported in lxd <2.1, so # until we have pervasive support for that, we'll do this tar hack. -tar cf - * .git | lxc exec $CONTAINER_NAME -- tar xf - -C /opt/pylxd +cd .. && tar cf - * .git | lxc exec $CONTAINER_NAME -- tar xf - -C /opt/pylxd lxc exec $CONTAINER_NAME -- /bin/sh -c "cd /opt/pylxd && tox -eintegration" lxc delete --force $CONTAINER_NAME diff --git a/run_integration_tests b/run_integration_tests deleted file mode 120000 index ae09ea3d..00000000 --- a/run_integration_tests +++ /dev/null @@ -1 +0,0 @@ -run_integration_tests-18-04 \ No newline at end of file