Move "modprobe" to run-in-vm

Don't bother attempting to load the aufs and zfs kernel modules during
provisioning for test VMs, since they'll get restarted for running
tests, and we only care if they're loaded when we actually want to run
tests.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai 2017-03-06 16:06:42 -05:00
parent 8d8b96fb59
commit a4a33a135f
2 changed files with 3 additions and 2 deletions

View File

@ -17,8 +17,6 @@ case "${ID_LIKE:-${ID:-unknown}}" in
apt-get -q -y install apt make git btrfs-progs libdevmapper-dev
apt-get -q -y install zfs-dkms zfsutils-linux
curl -sSL https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz | tar -xvz -C /usr/local
modprobe aufs
modprobe zfs
;;
fedora)
dnf -y clean all
@ -36,3 +34,4 @@ ln -s /vagrant /go/src/github.com/containers/storage
export GOPATH=/go
export PATH=/usr/local/go/bin:/go/bin:${PATH}
go get github.com/golang/lint/...
exit 0

View File

@ -15,6 +15,8 @@ if ${IN_VAGRANT_MACHINE:-false} ; then
unset AUTO_GOPATH
export GOPATH=/go
export PATH=${GOPATH}/bin:/go/src/${PKG}/vendor/src/github.com/golang/lint/golint:${PATH}
sudo modprobe aufs || true
sudo modprobe zfs || true
"$@"
else
vagrant up --provider ${VAGRANT_PROVIDER}