On 03/18/2013 05:52 AM, Lukáš Doktor wrote: > Dne 15.3.2013 22:50, Cole Robinson napsal(a): >> Since qemu_vm.py does it unconditionally. Adapt the code to handle >> empty extra_params. >> >> Signed-off-by: Cole Robinson <[email protected]> >> --- >> qemu/cfg/unittests.cfg | 1 - >> qemu/tests/unittest.py | 5 +++-- >> 2 files changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/qemu/cfg/unittests.cfg b/qemu/cfg/unittests.cfg >> index fae7b7c..0b7e08e 100644 >> --- a/qemu/cfg/unittests.cfg >> +++ b/qemu/cfg/unittests.cfg >> @@ -79,7 +79,6 @@ variants: >> isa_debugexit = yes >> isa_debugexit_iobase = 0xf4 >> isa_debugexit_iosize = 0x04 >> - extra_params += " -S" >> # In case you want to execute only a subset of the tests defined >> on the >> # unittests.cfg file on qemu-kvm, uncomment and edit test_list >> #unittest_test_list = idt_test hypercall vmexit realmode >> diff --git a/qemu/tests/unittest.py b/qemu/tests/unittest.py >> index 397d47f..bb4c471 100644 >> --- a/qemu/tests/unittest.py >> +++ b/qemu/tests/unittest.py >> @@ -54,7 +54,7 @@ def run_unittest(test, params, env): >> >> timeout = int(params.get('unittest_timeout', 600)) >> >> - extra_params_original = params['extra_params'] >> + extra_params_original = params.get('extra_params') >> >> for t in test_list: >> logging.info('Running %s', t) >> @@ -86,7 +86,8 @@ def run_unittest(test, params, env): >> extra_params = None >> if parser.has_option(t, 'extra_params'): >> extra_params = parser.get(t, 'extra_params') >> - params['extra_params'] += ' %s' % extra_params >> + params['extra_params'] = (params.get('extra_params') or "" + >> + ' %s' % extra_params) > > Hi I guess > > params.get('extra_params') or extra_params >
Actually I don't think that will do what I want either, but the original conditional is indeed confusing, so I'll clarify with the next patch. Thanks, Cole _______________________________________________ Virt-test-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/virt-test-devel
