xref: /qemu/tests/data/acpi/rebuild-expected-aml.sh (revision 0ce46ab50ec45c24cbf9e692dfef29bf00b0f55f)
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
15ab6b6a77SIgor Mammedovqemu_bins="x86_64-softmmu/qemu-system-x86_64 aarch64-softmmu/qemu-system-aarch64"
16cebc92a2SMarcel Apfelbaum
17*0ce46ab5SShameer Kolothumif [ ! -e "tests/qtest/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
29*0ce46ab5SShameer Kolothum    TEST_ACPI_REBUILD_AML=y QTEST_QEMU_BINARY=$qemu tests/qtest/bios-tables-test
30ae3c12a0SIgor Mammedovdone
31ae3c12a0SIgor Mammedov
325f6b3561SMichael S. Tsirkineval `grep SRC_PATH= config-host.mak`
335f6b3561SMichael S. Tsirkin
34*0ce46ab5SShameer Kolothumecho '/* List of comma-separated changed AML files to ignore */' > ${SRC_PATH}/tests/qtest/bios-tables-test-allowed-diff.h
35cebc92a2SMarcel Apfelbaum
36cebc92a2SMarcel Apfelbaumecho "The files were rebuilt and can be added to git."
37