-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathVagrantfile
More file actions
58 lines (53 loc) · 2.03 KB
/
Copy pathVagrantfile
File metadata and controls
58 lines (53 loc) · 2.03 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# vi: set ft=ruby :
# -*- coding: utf-8 -*-
#
# Meta test family (MTF) is a tool to test components of a modular Fedora:
# https://docs.pagure.org/modularity/
# Copyright (C) 2017 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# he Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Authors: Jan Scotka <jscotka@redhat.com>
#
Vagrant.configure(2) do |config|
config.vm.box = "fedora/26-cloud-base"
config.vm.synced_folder ".", "/opt/meta-test-family"
config.vm.network "private_network", ip: "192.168.50.10"
config.vm.network "forwarded_port", guest: 80, host: 8888
config.vm.hostname = "moduletesting"
config.vm.post_up_message = "Results: http://localhost:8888/avocado/job-results/latest/html/results.html"
config.vm.provider "libvirt" do |libvirt|
libvirt.memory = 1024
libvirt.nested = true
libvirt.cpu_mode = "host-model"
end
config.vm.provider "virtualbox" do |virtualbox|
virtualbox.memory = 1024
end
config.vm.provision "shell", inline: <<-SHELL
set -x
TARGET=#{ENV['TARGET']}
test -z "$TARGET" && TARGET=check-docker
cd /opt/meta-test-family
git submodule update --init
./requirements.sh
make install_pip
make -C examples/testing-module $TARGET
cp -r /root/avocado /var/www/html/
chmod -R a+x /var/www/html/
restorecon -r /var/www/html/
systemctl start httpd
SHELL
end