Skip to contentSkip to conversation

tests: require that acpi tests are enabled explicitly

PATCH New Michael S. Tsirkin 1 participant 1 message Jan 16, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests: require that acpi tests are enabled explicitly

ACPI code is changing as bit too fast to make
it worth it to require everyone to check
it against expected output.
Make test run depend on an ACPI_TEST_EXPECTED_AML
set in environment, so interested people can
run it without affecting everyone.

---

I'd like to prevent tests failing for everyone each time we change some ACPI code.
This is an inelegant way to do this, would be better to emit a warning and keep going.

 tests/acpi-test.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
tests/acpi-test.c +5 -1
index b5ab70a..c164382 100644
@@ -22,6 +22,7 @@
 #define MACHINE_PC "pc"
 #define MACHINE_Q35 "q35"
 
+#define ACPI_TEST_EXPECTED_AML "TEST_ACPI_TEST_AML"
 #define ACPI_REBUILD_EXPECTED_AML "TEST_ACPI_REBUILD_AML"
 
 /* DSDT and SSDTs format */
@@ -572,7 +573,10 @@ static void test_acpi_one(const char *params, test_data *data)
     test_acpi_dsdt_table(data);
     test_acpi_ssdt_tables(data);
 
-    if (iasl) {
+    if (getenv(ACPI_TEST_EXPECTED_AML)) {
+
+        g_assert(iasl);
+
         if (getenv(ACPI_REBUILD_EXPECTED_AML)) {
             dump_aml_files(data, true);
         } else {
Signature · 1 line
MST