]> git.proxmox.com Git - mirror_qemu.git/blame - tests/data/acpi/rebuild-expected-aml.sh
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200227' into staging
[mirror_qemu.git] / tests / data / acpi / rebuild-expected-aml.sh
CommitLineData
fa59483d 1#!/usr/bin/env bash
cebc92a2
MA
2
3#
4# Rebuild expected AML files for acpi unit-test
5#
6# Copyright (c) 2013 Red Hat Inc.
7#
8# Authors:
9# Marcel Apfelbaum <marcel.a@redhat.com>
ae3c12a0 10# Igor Mammedov <imammedo@redhat.com>
cebc92a2
MA
11#
12# This work is licensed under the terms of the GNU GPLv2.
13# See the COPYING.LIB file in the top-level directory.
14
ab6b6a77 15qemu_bins="x86_64-softmmu/qemu-system-x86_64 aarch64-softmmu/qemu-system-aarch64"
cebc92a2 16
0ce46ab5 17if [ ! -e "tests/qtest/bios-tables-test" ]; then
90475791 18 echo "Test: bios-tables-test is required! Run make check before this script."
cebc92a2
MA
19 echo "Run this script from the build directory."
20 exit 1;
21fi
22
ae3c12a0
IM
23for qemu in $qemu_bins; do
24 if [ ! -e $qemu ]; then
25 echo "Run 'make' to build the following QEMU executables: $qemu_bins"
26 echo "Also, run this script from the build directory."
27 exit 1;
28 fi
0ce46ab5 29 TEST_ACPI_REBUILD_AML=y QTEST_QEMU_BINARY=$qemu tests/qtest/bios-tables-test
ae3c12a0
IM
30done
31
5f6b3561
MT
32eval `grep SRC_PATH= config-host.mak`
33
6ab425d8
MT
34old_allowed_dif=`grep -v -e 'List of comma-separated changed AML files to ignore' ${SRC_PATH}/tests/qtest/bios-tables-test-allowed-diff.h`
35
0ce46ab5 36echo '/* List of comma-separated changed AML files to ignore */' > ${SRC_PATH}/tests/qtest/bios-tables-test-allowed-diff.h
cebc92a2
MA
37
38echo "The files were rebuilt and can be added to git."
6ab425d8
MT
39
40if [ -z "$old_allowed_dif" ]; then
41 echo "Note! Please do not commit expected files with source changes"
42 echo "Note! Please follow the process documented in ${SRC_PATH}/tests/qtest/bios-tables-test.c"
43fi