Skip to content
Snippets Groups Projects
Commit 4fdcc474 authored by Luca Bruno's avatar Luca Bruno Committed by GitHub
Browse files

Merge pull request #179 from lucab/to-upstream/travis-containers

travis: run whole testsuite in containers
parents 03741568 fd65dcf0
No related branches found
No related tags found
No related merge requests found
language: go
go: 1.4
sudo: required
services:
- docker
env:
global:
- GOPATH=/opt
- BUILD_DIR=/opt/src/github.com/coreos/go-systemd
matrix:
- DOCKER_BASE=ubuntu:16.04
- DOCKER_BASE=debian:stretch
before_install:
- docker pull ${DOCKER_BASE}
- docker run --privileged -e GOPATH=${GOPATH} --cidfile=/tmp/cidfile ${DOCKER_BASE} /bin/bash -c "apt-get update && apt-get install -y build-essential git golang dbus libsystemd-dev libpam-systemd && go get github.com/coreos/pkg/dlopen && go get github.com/godbus/dbus"
- docker commit `cat /tmp/cidfile` go-systemd/container-tests
- rm -f /tmp/cidfile
install:
- go get github.com/godbus/dbus
- docker run -d --cidfile=/tmp/cidfile --privileged -e GOPATH=${GOPATH} -v ${PWD}:${BUILD_DIR} go-systemd/container-tests /bin/systemd --system
script:
- ./test
- docker exec `cat /tmp/cidfile` /bin/bash -c "cd ${BUILD_DIR} && ./test"
after_script:
- docker kill `cat /tmp/cidfile`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment