-
Notifications
You must be signed in to change notification settings - Fork 49
/
.travis.yml
42 lines (36 loc) · 1.21 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
language: go
os: linux
dist: trusty
sudo: require
go:
- 1.5
- 1.6
- 1.7
env:
- LIBVIRT=1.2.2 EXT=gz TAGS=""
- LIBVIRT=1.2.14 EXT=gz TAGS="libvirt.1.2.14"
- LIBVIRT=2.3.0 EXT=xz TAGS="libvirt.1.2.14"
install:
- sudo apt-get -qqy build-dep libvirt
- sudo apt-get -qqy install curl qemu-system-x86 sasl2-bin
- sudo mkdir -p /usr/src && sudo chown $(id -u) /usr/src
- curl -O -s https://libvirt.org/sources/libvirt-${LIBVIRT}.tar.${EXT}
- tar -C /usr/src -xf libvirt-${LIBVIRT}.tar.${EXT}
- pushd /usr/src/libvirt-${LIBVIRT}
- |
./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
--without-polkit \
--without-esx --without-vbox --without-xen --without-libxl \
--with-qemu --with-lxc
- make
- sudo make install
- popd
- sudo libvirtd -d -l -f libvirtd.conf
- sudo virtlogd -d || true
- sudo chmod a+rwx /var/run/libvirt/libvirt-sock*
- sudo chmod a+rwx /var/lib/libvirt/images
- echo "pass" | sudo saslpasswd2 -p -a libvirt user
script:
- qemu-img create -f qcow2 /var/lib/libvirt/images/test-src.qcow2 1G
- sudo chmod a+rwx /var/lib/libvirt/images/test-src.qcow2
- go test -timeout 1m -tags "${TAGS}" -v