Message ID | 20230206150416.4604-10-farosas@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | qtests vs. default devices | expand |
On 06/02/2023 16.04, Fabiano Rosas wrote: > Signed-off-by: Fabiano Rosas <farosas@suse.de> > --- > tests/qtest/hexloader-test.c | 5 +++++ > tests/qtest/meson.build | 4 ++-- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/tests/qtest/hexloader-test.c b/tests/qtest/hexloader-test.c > index 3023548041..3ab464f438 100644 > --- a/tests/qtest/hexloader-test.c > +++ b/tests/qtest/hexloader-test.c > @@ -22,6 +22,11 @@ static void hex_loader_test(void) > unsigned int i; > const unsigned int base_addr = 0x00010000; > > + if (!qtest_has_device("loader")) { > + g_test_skip("Device 'loader' not available"); > + return; > + } > + > QTestState *s = qtest_initf( > "-M vexpress-a9 -device loader,file=tests/data/hex-loader/test.hex"); > > diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build > index 431b623df9..a930706a43 100644 > --- a/tests/qtest/meson.build > +++ b/tests/qtest/meson.build > @@ -197,11 +197,11 @@ qtests_arm = \ > (config_all_devices.has_key('CONFIG_PFLASH_CFI02') ? ['pflash-cfi02-test'] : []) + \ > (config_all_devices.has_key('CONFIG_ASPEED_SOC') ? qtests_aspeed : []) + \ > (config_all_devices.has_key('CONFIG_NPCM7XX') ? qtests_npcm7xx : []) + \ > + (config_all_devices.has_key('CONFIG_GENERIC_LOADER') ? ['hexloader-test'] : []) + \ > ['arm-cpu-features', > 'microbit-test', > 'test-arm-mptimer', > - 'boot-serial-test', > - 'hexloader-test'] > + 'boot-serial-test'] In this case, I think the change to meson.build should be enough, since there is no machine that does "select GENERIC_LOADER" in the Kconfig files ... or do I miss something again? Thomas
diff --git a/tests/qtest/hexloader-test.c b/tests/qtest/hexloader-test.c index 3023548041..3ab464f438 100644 --- a/tests/qtest/hexloader-test.c +++ b/tests/qtest/hexloader-test.c @@ -22,6 +22,11 @@ static void hex_loader_test(void) unsigned int i; const unsigned int base_addr = 0x00010000; + if (!qtest_has_device("loader")) { + g_test_skip("Device 'loader' not available"); + return; + } + QTestState *s = qtest_initf( "-M vexpress-a9 -device loader,file=tests/data/hex-loader/test.hex"); diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 431b623df9..a930706a43 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -197,11 +197,11 @@ qtests_arm = \ (config_all_devices.has_key('CONFIG_PFLASH_CFI02') ? ['pflash-cfi02-test'] : []) + \ (config_all_devices.has_key('CONFIG_ASPEED_SOC') ? qtests_aspeed : []) + \ (config_all_devices.has_key('CONFIG_NPCM7XX') ? qtests_npcm7xx : []) + \ + (config_all_devices.has_key('CONFIG_GENERIC_LOADER') ? ['hexloader-test'] : []) + \ ['arm-cpu-features', 'microbit-test', 'test-arm-mptimer', - 'boot-serial-test', - 'hexloader-test'] + 'boot-serial-test'] # TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional qtests_aarch64 = \
Signed-off-by: Fabiano Rosas <farosas@suse.de> --- tests/qtest/hexloader-test.c | 5 +++++ tests/qtest/meson.build | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-)