[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for-2.3 2/2] i440fx-test: Fix test paths to include
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH for-2.3 2/2] i440fx-test: Fix test paths to include architecture |
Date: |
Tue, 24 Mar 2015 23:45:48 +0100 |
Replace g_test_add_func() with new qtest_add_func() and modify the path
passed to g_test_add() macro.
Signed-off-by: Andreas Färber <address@hidden>
---
tests/i440fx-test.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c
index a3f7279..bc3f54c 100644
--- a/tests/i440fx-test.c
+++ b/tests/i440fx-test.c
@@ -383,8 +383,10 @@ static void add_firmware_test(const char *testpath,
void (*setup_fixture)(FirmwareTestFixture *f,
gconstpointer test_data))
{
- g_test_add(testpath, FirmwareTestFixture, NULL, setup_fixture,
+ char *path = g_strdup_printf("/%s%s", qtest_get_arch(), testpath);
+ g_test_add(path, FirmwareTestFixture, NULL, setup_fixture,
test_i440fx_firmware, NULL);
+ g_free(path);
}
static void request_bios(FirmwareTestFixture *fixture,
@@ -408,8 +410,8 @@ int main(int argc, char **argv)
data.num_cpus = 1;
- g_test_add_data_func("/i440fx/defaults", &data, test_i440fx_defaults);
- g_test_add_data_func("/i440fx/pam", &data, test_i440fx_pam);
+ qtest_add_data_func("i440fx/defaults", &data, test_i440fx_defaults);
+ qtest_add_data_func("i440fx/pam", &data, test_i440fx_pam);
add_firmware_test("/i440fx/firmware/bios", request_bios);
add_firmware_test("/i440fx/firmware/pflash", request_pflash);
--
2.1.4