xref: /qemu/tests/data/acpi/rebuild-expected-aml.sh (revision ab6b6a7777449905a70f7e80790719779e7f3313)
1fa59483dSPhilippe Mathieu-Daudé#!/usr/bin/env bash
2cebc92a2SMarcel Apfelbaum
3cebc92a2SMarcel Apfelbaum#
4cebc92a2SMarcel Apfelbaum# Rebuild expected AML files for acpi unit-test
5cebc92a2SMarcel Apfelbaum#
6cebc92a2SMarcel Apfelbaum# Copyright (c) 2013 Red Hat Inc.
7cebc92a2SMarcel Apfelbaum#
8cebc92a2SMarcel Apfelbaum# Authors:
9cebc92a2SMarcel Apfelbaum#  Marcel Apfelbaum <marcel.a@redhat.com>
10ae3c12a0SIgor Mammedov#  Igor Mammedov <imammedo@redhat.com>
11cebc92a2SMarcel Apfelbaum#
12cebc92a2SMarcel Apfelbaum# This work is licensed under the terms of the GNU GPLv2.
13cebc92a2SMarcel Apfelbaum# See the COPYING.LIB file in the top-level directory.
14cebc92a2SMarcel Apfelbaum
15*ab6b6a77SIgor Mammedovqemu_bins="x86_64-softmmu/qemu-system-x86_64 aarch64-softmmu/qemu-system-aarch64"
16cebc92a2SMarcel Apfelbaum
1790475791SPaolo Bonziniif [ ! -e "tests/bios-tables-test" ]; then
1890475791SPaolo Bonzini    echo "Test: bios-tables-test is required! Run make check before this script."
19cebc92a2SMarcel Apfelbaum    echo "Run this script from the build directory."
20cebc92a2SMarcel Apfelbaum    exit 1;
21cebc92a2SMarcel Apfelbaumfi
22cebc92a2SMarcel Apfelbaum
23ae3c12a0SIgor Mammedovfor qemu in $qemu_bins; do
24ae3c12a0SIgor Mammedov    if [ ! -e $qemu ]; then
25ae3c12a0SIgor Mammedov        echo "Run 'make' to build the following QEMU executables: $qemu_bins"
26ae3c12a0SIgor Mammedov        echo "Also, run this script from the build directory."
27ae3c12a0SIgor Mammedov        exit 1;
28ae3c12a0SIgor Mammedov    fi
2990475791SPaolo Bonzini    TEST_ACPI_REBUILD_AML=y QTEST_QEMU_BINARY=$qemu tests/bios-tables-test
30ae3c12a0SIgor Mammedovdone
31ae3c12a0SIgor Mammedov
32cebc92a2SMarcel Apfelbaum
33cebc92a2SMarcel Apfelbaumecho "The files were rebuilt and can be added to git."
34