253.1.1
by Tim Kuhlman
Initial implementation of an LXD mojo environment for testing |
1 |
#!/bin/bash -x
|
2 |
#
|
|
3 |
# Run a spec with the currently installed mojo, assumes MOJO_* env variables are set or in an envrc
|
|
4 |
# file passed as an arg
|
|
5 |
set -e
|
|
6 |
||
7 |
if [ $# -eq 1 ]; then |
|
8 |
source $1 |
|
9 |
fi
|
|
10 |
||
279.2.5
by Tim Kuhlman
Whoops you need the container for anything with a build step, I will use containerless for the quick integration spec only. |
11 |
mojo -r ${MOJO_ROOT} project-new --series ${MOJO_SERIES} ${MOJO_PROJECT} |
279.2.6
by Tim Kuhlman
Initial quick integration test setup |
12 |
|
281
by Tom Haddon
[timkuhlman,r=mthaddon] lxd-contrib: changed the run-spec script to stop using sudo, added the first working quick-integration spec test |
13 |
# The chmod is because of lp bug#1412692
|
279.2.5
by Tim Kuhlman
Whoops you need the container for anything with a build step, I will use containerless for the quick integration spec only. |
14 |
sudo chmod 755 /var/lib/lxc/${MOJO_PROJECT}.${MOJO_SERIES} && sudo chmod 755 /var/lib/lxc |
279.2.6
by Tim Kuhlman
Initial quick integration test setup |
15 |
|
253.1.1
by Tim Kuhlman
Initial implementation of an LXD mojo environment for testing |
16 |
mojo workspace-new ${MOJO_SPEC} ${MOJO_PROJECT} |
17 |
mojo run |
|
18 |
||
19 |
if [ $? -eq 0 ]; then |
|
279.2.1
by Tim Kuhlman
Run containerless its faster, also drop sudo as that is no longer needed for mojo project-* |
20 |
mojo project-destroy ${MOJO_PROJECT} |
253.1.1
by Tim Kuhlman
Initial implementation of an LXD mojo environment for testing |
21 |
fi
|