[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 01/51] tests: acpi: print ASL diff in verbose mod
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v2 01/51] tests: acpi: print ASL diff in verbose mode |
Date: |
Mon, 28 Dec 2015 18:02:08 +0100 |
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>
---
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);
--
1.8.3.1
- [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support, Igor Mammedov, 2015/12/28
- [Qemu-devel] [PATCH v2 03/51] pc: acpi: memhp: move MHPD._STA method into SSDT, Igor Mammedov, 2015/12/28
- [Qemu-devel] [PATCH v2 04/51] pc: acpi: memhp: move MHPD.MLCK mutex into SSDT, Igor Mammedov, 2015/12/28
- [Qemu-devel] [PATCH v2 01/51] tests: acpi: print ASL diff in verbose mode,
Igor Mammedov <=
- [Qemu-devel] [PATCH v2 02/51] pc: acpi: memhp: prepare context in SSDT for moving memhp DSDT code, Igor Mammedov, 2015/12/28
- [Qemu-devel] [PATCH v2 05/51] pc: acpi: memhp: move MHPD.MSCN method into SSDT, Igor Mammedov, 2015/12/28
- [Qemu-devel] [PATCH v2 06/51] pc: acpi: memhp: move MHPD.MRST method into SSDT, Igor Mammedov, 2015/12/28
- [Qemu-devel] [PATCH v2 08/51] pc: acpi: memhp: move MHPD.MOST method into SSDT, Igor Mammedov, 2015/12/28
- [Qemu-devel] [PATCH v2 07/51] pc: acpi: memhp: move MHPD.MPXM method into SSDT, Igor Mammedov, 2015/12/28
- [Qemu-devel] [PATCH v2 10/51] pc: acpi: memhp: move MHPD.MCRS method into SSDT, Igor Mammedov, 2015/12/28
- [Qemu-devel] [PATCH v2 11/51] pc: acpi: memhp: move MHPD Device into SSDT, Igor Mammedov, 2015/12/28
- [Qemu-devel] [PATCH v2 15/51] pc: acpi: drop unused CPU_STATUS_LEN from DSDT, Igor Mammedov, 2015/12/28
- [Qemu-devel] [PATCH v2 17/51] pc: acpi: cpuhp: move CPMA() method into SSDT, Igor Mammedov, 2015/12/28
- [Qemu-devel] [PATCH v2 14/51] pc: acpi: memhp: drop not needed stringify(MEMORY_foo) usage, Igor Mammedov, 2015/12/28