1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-16 11:43:08 +00:00
Commit Graph

3 Commits

Author SHA1 Message Date
Adam Williamson
b35695c4ce kickstart-tests: fix up several tests
this gets quite a few more tests working. We now handle crypted
disks, tests with czech keyboard layout, and the proxy tests. We
also handle the package tests that boot to lightdm because they
install Xfce, by allowing forced console login after graphical
boot with FORCE_CONSOLE_LOGIN.

We also allow (require, in fact) specifying URLs for the HTTP
and NFS test repos (we don't do anything for generating those,
you're expected to do it with the script from kickstart-tests).

We now handle the filesystem type tests when run on a Server
image (previously they would fail because default FS on those
is xfs while the kickstart test expects ext4). We workaround
the kickstart test 'fail' in the openQA test for now, as fixing
the kickstart test is actually quite complex (detecting a Server
install from a %post script is not super clean).

Note these changes depend on kickstart-tests PRs #14 and #15 to
some extent (without #14 in fact the 'kickstarts' command will
die in a fire, as it expects the Makefile from that PR to be
present). Without #15 the reqpart test may fail.
2016-04-06 22:35:32 -07:00
Adam Williamson
d33f624c20 kickstart-tests: handle non-US keyboard layouts
wow, this was a deep dive. A few of the kickstart-tests set the
OS keymap to cz. Long story short, the way openQA does keyboard
input is via VNC; VNC keyboard events are for keysyms, which
are layout-dependent (so when we say `send_key "a"`, openQA
sends qemu the keysym for 'a', regardless of layout issues).
qemu turns the keysym into a keycode and sends *that* to the
guest OS, which turns it back into a keysym according to its
keymap config.

qemu uses a US map by default to turn the keysym it receives via
VNC into a keycode. So if you send qemu a '-', it sends the guest
OS the keycode that would be converted to the keysym for '-' *in
the US layout*. But if the guest OS has its layout set to cz,
the same keycode is converted to '=', since that's what the key
with that keycode is labelled as on a Czech keyboard.

That's why if you set the guest OS keymap to cz and tell openQA
to type '-', you get '='.

However! You can tell qemu to use a different keymap for its
keysym -> keycode conversion. If you keep the qemu keymap and
the guest OS keymap lined up, when you say `send_key "-"`, you
should actually *get* a "-". Which is what we want, for these
tests. So we tell openQA to tell qemu to do that, using the
VNCKB var, which is for precisely this: it tells os-autoinst
to run qemu with `-k (layout)`.
2016-04-04 14:21:06 -07:00
Adam Williamson
dd247c7737 add bits for translating anaconda kickstart_tests to openQA
perl2json converts the openQA templates file to JSON (so we
can parse it with Python). kstest-converter does the meat of
the work of translating kickstart-tests to openQA tests: its
'kickstarts' subcommand produces .ks files from the .ks.in
files (you need to then make them available via HTTP somehow),
its 'templates' subcommand produces openQA 'test suites' and
'job templates' and merges them into an existing templates
file. Then you can load the templates file and fire off the
tests.
2016-04-02 17:27:11 -07:00