Dne 15.3.2013 22:50, Cole Robinson napsal(a):
This is derived from the sample qemu/cfg/unittests.cfg

Signed-off-by: Cole Robinson <[email protected]>
---

Using the example unittests.cfg may pull in these bits, which means we
could drop the - unittest: section from that config. However I can't
get it to work as is documented, so I can't test my assumption:

$ ./run --config qemu/cfg/unittests.cfg --qemu-bin /usr/bin/qemu-kvm
SETUP: PASS (1.01 s)
DATA DIR: /home/crobinso/virt_test
DEBUG LOG:
/home/crobinso/src/autotest-virt-tests/logs/run-2013-03-15-13.20.27/debug.log
Empty config set generated
Tests chosen: ''
Check that you typed the tests names correctly, and double check that tests
show in --list-tests for guest 'JeOS'

Broken before these patches as well.

  qemu/tests/cfg/unittest.cfg | 20 ++++++++++++++++++++
  1 file changed, 20 insertions(+)
  create mode 100644 qemu/tests/cfg/unittest.cfg

diff --git a/qemu/tests/cfg/unittest.cfg b/qemu/tests/cfg/unittest.cfg
new file mode 100644
index 0000000..58201da
--- /dev/null
+++ b/qemu/tests/cfg/unittest.cfg
@@ -0,0 +1,20 @@
+- unittest:
+    type = unittest
+    vms = ''
+    start_vm = no
+
+    take_regular_screendumps = no
+    run_tcpdump = no
+    run_kvm_stat = yes
+
+    unittest_timeout = 240
+    testdev = yes
+    isa_debugexit = yes
+    isa_debugexit_iobase = 0xf4
+    isa_debugexit_iosize = 0x04
+
+    # 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
+    # In case you want to excluse just some of the tests, use a blacklist
+    #unittest_test_blacklist = access apic emulator


The unittest variant is defined inside the "qemu/cfg/unittests.cfg" file, thus it's not required for unittest to be executed.

Anyway you are right that there is something wrong with the ./run. When I specify "-g Fedora.18.64" (or other distro even not existing one "adsf") it does work. The problem is with:


    def _process_machine_type(self):
        if self.options.machine_type is None:
# TODO: this is x86-specific, instead we can get the default arch
            # from qemu binary and run on all supported machine types
            if self.options.arch is None and self.options.guest_os is None:
                self.cartesian_parser.only_filter(DEFAULT_MACHINE_TYPE)
        elif not self.options.config:
            self.cartesian_parser.only_filter(self.options.machine_type)
        else:
            logging.info("Config provided, ignoring --machine-type option")

which forces only_filter on JeOS, which doesn't exist in unittest (as it doesn't import guest-os.cfg).

I'll send a patch fixing this. The unittest.cfg is not required for unittest to work. So you can skip this (only this one) patch.

Regards,
Lukáš

_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel

Reply via email to