aboutsummaryrefslogtreecommitdiff
path: root/tests/vm/ubuntu.i386
blob: 47681b6f87dd895882767d4ce4b2687b976de0b7 (plain)
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
#!/usr/bin/env python3
#
# Ubuntu i386 image
#
# Copyright 2017 Red Hat Inc.
#
# Authors:
#  Fam Zheng <famz@redhat.com>
#
# This code is licensed under the GPL version 2 or later.  See
# the COPYING file in the top-level directory.
#

import sys
import basevm
import ubuntuvm

DEFAULT_CONFIG = {
    'install_cmds' : "apt-get update,"\
                     "apt-get build-dep -y qemu,"\
                     "apt-get install -y libfdt-dev language-pack-en ninja-build",
}

class UbuntuX86VM(ubuntuvm.UbuntuVM):
    name = "ubuntu.i386"
    arch = "i386"
    image_link="https://cloud-images.ubuntu.com/releases/bionic/"\
               "release-20191114/ubuntu-18.04-server-cloudimg-i386.img"
    image_sha256="28969840626d1ea80bb249c08eef1a4533e8904aa51a327b40f37ac4b4ff04ef"
    BUILD_SCRIPT = """
        set -e;
        cd $(mktemp -d);
        sudo chmod a+r /dev/vdb;
        tar -xf /dev/vdb;
        ./configure {configure_opts};
        make --output-sync {target} -j{jobs} {verbose};
    """

if __name__ == "__main__":
    sys.exit(basevm.main(UbuntuX86VM, DEFAULT_CONFIG))