tests: Skip old versioned machine types in quick testing mode

The tests that check something for all machine types currently spend
a lot of time checking old machine types (like "pc-i440fx-2.0" for
example). The chances that we find something new there in addition
to checking the latest version of a machine type are pretty low, so
we should not waste the time of the developers by testing this again
and again in the "quick" testing mode.
Thus let's add some code to determine whether we are testing a current
machine type or an old one, and only test the old types if we are
running in "SPEED=slow" mode.
This decreases the testing time quite a bit now, e.g. the qom-test
now finishes within 4 seconds for qemu-system-x86_64 instead of 30
seconds when testing all machines.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1534419358-10932-6-git-send-email-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Thomas Huth 2018-08-16 13:35:55 +02:00 committed by Paolo Bonzini
parent 29551fdcf4
commit 1f4a0d81af
5 changed files with 58 additions and 8 deletions

View file

@ -954,10 +954,12 @@ QDict *qmp_fd(int fd, const char *fmt, ...) GCC_FMT_ATTR(2, 3);
/**
* qtest_cb_for_every_machine:
* @cb: Pointer to the callback function
* @skip_old_versioned: true if versioned old machine types should be skipped
*
* Call a callback function for every name of all available machines.
*/
void qtest_cb_for_every_machine(void (*cb)(const char *machine));
void qtest_cb_for_every_machine(void (*cb)(const char *machine),
bool skip_old_versioned);
/**
* qtest_qmp_device_add: