add ninja to dockerfiles, CI configurations and test VMs
[qemu.git] / tests / vm / ubuntu.i386
1 #!/usr/bin/env python3
2 #
3 # Ubuntu i386 image
4 #
5 # Copyright 2017 Red Hat Inc.
6 #
7 # Authors:
8 #  Fam Zheng <famz@redhat.com>
9 #
10 # This code is licensed under the GPL version 2 or later.  See
11 # the COPYING file in the top-level directory.
12 #
13
14 import sys
15 import basevm
16 import ubuntuvm
17
18 DEFAULT_CONFIG = {
19     'install_cmds' : "apt-get update,"\
20                      "apt-get build-dep -y qemu,"\
21                      "apt-get install -y libfdt-dev language-pack-en ninja-build",
22 }
23
24 class UbuntuX86VM(ubuntuvm.UbuntuVM):
25     name = "ubuntu.i386"
26     arch = "i386"
27     image_link="https://cloud-images.ubuntu.com/releases/bionic/"\
28                "release-20191114/ubuntu-18.04-server-cloudimg-i386.img"
29     image_sha256="28969840626d1ea80bb249c08eef1a4533e8904aa51a327b40f37ac4b4ff04ef"
30     BUILD_SCRIPT = """
31         set -e;
32         cd $(mktemp -d);
33         sudo chmod a+r /dev/vdb;
34         tar -xf /dev/vdb;
35         ./configure {configure_opts};
36         make --output-sync {target} -j{jobs} {verbose};
37     """
38
39 if __name__ == "__main__":
40     sys.exit(basevm.main(UbuntuX86VM, DEFAULT_CONFIG))