[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 04/59] tests: acpi: print ASL diff in verbose mode
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 04/59] tests: acpi: print ASL diff in verbose mode |
Date: |
Sat, 9 Jan 2016 23:39:25 +0200 |
From: Igor Mammedov <address@hidden>
print ASL difference if there is any when
executing 'make V=1 check'.
Use 'DIFF' environment variable to determine
which diff utility to use and if it's not set
notify user by printing warning that DIFF is
not set if run in verbose mode and there is
difference in ASL.
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
tests/bios-tables-test.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 6d37332..75ec330 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -580,6 +580,22 @@ static void test_acpi_asl(test_data *data)
(gchar *)&signature,
sdt->asl_file, sdt->aml_file,
exp_sdt->asl_file, exp_sdt->aml_file);
+ if (getenv("V")) {
+ const char *diff_cmd = getenv("DIFF");
+ if (diff_cmd) {
+ int ret G_GNUC_UNUSED;
+ char *diff = g_strdup_printf("%s %s %s", diff_cmd,
+ exp_sdt->asl_file, sdt->asl_file);
+ ret = system(diff) ;
+ g_free(diff);
+ } else {
+ fprintf(stderr, "acpi-test: Warning. not showing "
+ "difference since no diff utility is specified. "
+ "Set 'DIFF' environment variable to a preferred "
+ "diff utility and run 'make V=1 check' again to "
+ "see ASL difference.");
+ }
+ }
}
}
g_string_free(asl, true);
--
MST
- [Qemu-devel] [PULL v2 00/59] acpi dsdt rework, misc fixes, Michael S. Tsirkin, 2016/01/09
- [Qemu-devel] [PULL v2 01/59] nvdimm: fix header pointer in nvdimm_build_nfit(), Michael S. Tsirkin, 2016/01/09
- [Qemu-devel] [PULL v2 02/59] igd-passthrough: fix use of host_pci_config_read, Michael S. Tsirkin, 2016/01/09
- [Qemu-devel] [PULL v2 03/59] hw/i386: fill in the CENTURY field of the FADT (FACP) ACPI table, Michael S. Tsirkin, 2016/01/09
- [Qemu-devel] [PULL v2 04/59] tests: acpi: print ASL diff in verbose mode,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 05/59] pc: acpi: memhp: prepare context in SSDT for moving memhp DSDT code, Michael S. Tsirkin, 2016/01/09
- [Qemu-devel] [PULL v2 06/59] pc: acpi: memhp: move MHPD._STA method into SSDT, Michael S. Tsirkin, 2016/01/09
- [Qemu-devel] [PULL v2 07/59] pc: acpi: memhp: move MHPD.MLCK mutex into SSDT, Michael S. Tsirkin, 2016/01/09
- [Qemu-devel] [PULL v2 09/59] pc: acpi: memhp: move MHPD.MRST method into SSDT, Michael S. Tsirkin, 2016/01/09
- [Qemu-devel] [PULL v2 08/59] pc: acpi: memhp: move MHPD.MSCN method into SSDT, Michael S. Tsirkin, 2016/01/09
- [Qemu-devel] [PULL v2 10/59] pc: acpi: memhp: move MHPD.MPXM method into SSDT, Michael S. Tsirkin, 2016/01/09
- [Qemu-devel] [PULL v2 12/59] pc: acpi: memhp: move MHPD.MEJ0 method into SSDT, Michael S. Tsirkin, 2016/01/09
- [Qemu-devel] [PULL v2 11/59] pc: acpi: memhp: move MHPD.MOST method into SSDT, Michael S. Tsirkin, 2016/01/09
- [Qemu-devel] [PULL v2 13/59] pc: acpi: memhp: move MHPD.MCRS method into SSDT, Michael S. Tsirkin, 2016/01/09
- [Qemu-devel] [PULL v2 14/59] pc: acpi: memhp: move MHPD Device into SSDT, Michael S. Tsirkin, 2016/01/09