Commit Graph

72 Commits

Author SHA1 Message Date
Adam Williamson 86c975e49a Whoops, fix a wait_still_screen call from last commit
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-04-13 14:59:14 -07:00
Adam Williamson 7465985c50 Add some waits to root password creation on ARM
This is failing quite consistently lately because we're typing
too fast, we need to wait a bit after the sudo su at least. Let's
be safer.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-04-13 14:22:30 -07:00
Adam Williamson 5f702b0be8 Run update repo setup steps from a serial console
This is a surprisingly large change as we want to go back to
the console we were previously on after doing it. To do that we
need to know what console we were on, and to know *that*, we need
to port everything that currently uses (ctrl-)alt-fX to switch
consoles to use select_console instead.

This is primarily intended to make running setup_repos.py faster
when it has to download a lot of packages (as typing in hundreds
of package names is quite slow). But it actually makes the whole
thing faster, even when only downloading one or two packages.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-01-11 12:09:59 -08:00
Adam Williamson 171230ab1a Try hiding cursor in middle right of screen on desktops
os-autoinst is set so that if you once manually set the cursor
somewhere, all subsequent calls to `assert_and_click` will return
the cursor to the last manually-set position (if you never set
the cursor anywhere manually, it uses the `mouse_hide` location).
The mouse_hide location is no good for modern desktops as they
use hot corners in various ways, so for the desktop tests, early
in login, we set the mouse to 300/800, which we hope is a kind
of neutral location that doesn't interfere with matches of the
desktop_background needles (which I usually put towards the
right of the screen).

Unfortunately, KDE can show fairly big previews of active windows
down there, and hovering over one causes that window to be
displayed and all others to be hidden. Which rather breaks the
desktop browser test, when we have the Welcome Center popping up
on boot.

We already moved the mouse set point from 300/200 a few years
back because of a *different* awkward interaction with the browser
test, so we can't go back there. Let's try 1023/384 instead -
that's all the way on the right hand side of the screen, but half
way down, not in either corner. I really hope this doesn't cause
problems for any tests cos I don't know where else to stick the
damn thing if this doesn't work.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-12-04 09:15:17 -08:00
Adam Williamson 6aa52fc3cb Drop similarity level on a wait_still_screen with a cursor
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-02-23 15:06:07 -08:00
Adam Williamson 8e68c385d3 Just *always* expect a welcome tour now
Plasma 5.27.1 is going all the way back to F36 (in
FEDORA-2023-d7dcc38129), so we'll have a welcome tour on both
desktops we actually test on, on all supported releases. So we
can just drop the desktop conditional entirely here now.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-02-23 09:41:46 -08:00
Adam Williamson 66a899d797 Expect KDE welcome screen on F37 too
5.27.1 is going to F37, and adds it. In the short term this
will waste a minute and a half and cause soft fails on all other
F37 updates until the update that adds this goes stable, but
I don't really feel like working around this, let's just live
with it till the update goes stable.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-02-22 14:11:07 -08:00
Adam Williamson b9500536cc Make the changed handle_welcome_screen conditional clearer
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-02-21 18:22:59 -08:00
Adam Williamson ddb3f44c57 Extend handle_welcome_screen to cover new KDE welcome tour
KDE has a welcome tour now, on F38 and Rawhide at least. Let's
"handle" it with extreme prejudice...

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-02-21 18:16:13 -08:00
Adam Williamson ea8e1f950d Drop #2120433 workaround
The bug seems to have gone away, at least I don't see that this
soft failure has been hit much for the last two months.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-12-13 12:45:20 -08:00
Adam Williamson ffbb618d03 Simplify _graphical_wait_login welcome screen logic
This turns out to be overcomplicated. We don't need the special
handling for updates any more, because a few months after we
implemented it, we had to make sure the affected update tests had
an empty START_AFTER_TEST anyway, or else openQA would refuse to
schedule them. So we can just rely on the START_AFTER_TEST
condition for those now. We also don't need the additional
INSTALL_NO_USER condition; the only case where it's actually used
is for install_arm_image_deployment_upload on Workstation, and
that test does not have START_AFTER_TEST set, so the other
condition catches it for welcome screen handling purposes. There
is no need to nest the IMAGE_DEPLOY conditional inside a check
for the desktop and the INSTALL_NO_USER var either; we don't
test any other desktop on ARM, and the IMAGE_DEPLOY var is only
set for that one install_arm_image_deployment_upload test.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-12-12 08:48:53 -08:00
Adam Williamson f752b4c00a Don't snapshot after wait_login tests (usually)
We currently snapshot after every run of _console_wait_login or
_graphical_wait_login, which means we snapshot *twice* on most
update tests as those modules get run twice. However, we almost
never use those snapshots. Snapshotting takes quite some time,
and hits the disk pretty hard, so we should avoid it unless it
is really needed.

We only have a few modules that are not fatal (and so might use
the snapshots), and most of those don't run after one of these
tests, or run after a later module that's also a milestone. Best
I can tell, only two test suites really need to use a snapshot
from a login test: server_cockpit_updates and modularity_tests.
To handle these and potential future cases, we'll add a new
module that does nothing, but is marked 'milestone', so it will
take a snapshot, and load that test after the login test if the
var LOGIN_SNAPSHOT is set, and set that var for those two suites.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-12-08 09:59:23 -08:00
Adam Williamson 7675e99fcc Make internal state marker variables upper-case
We use variables to track test state across modules, sometimes.
As this is all internal to the test logic I didn't bother always
making these variables upper-case, but os-autoinst now treats
lower-case variables as a fatal error, so we have to change.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-09-27 23:18:42 -07:00
Adam Williamson 5f6232a5a5 Workaround RHBZ#2120433 - try login again if it fails
Also stop re-doing get_var("DESKTOP") because that's dumb. This
should only, at worst, make things slower if unexpected things
happen - it shouldn't cause failures that wouldn't happen anyway.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-08-22 17:24:39 -07:00
Adam Williamson 1a65993d36 Add a perltidy check and apply it to the entire codebase
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-07-28 14:38:38 -07:00
Adam Williamson 428b022255 Drop new user g-i-s handling in _graphical_wait_login
New user g-i-s is gone since F34, and F33 is dead.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-05-16 16:15:52 -07:00
Adam Williamson 09a0f19e36 Try and split 'g-i-s done' and 'welcome tour done'
They're not always the same, and it's breaking things on aarch64.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-02-19 17:58:58 -08:00
Adam Williamson 81d6db802f ...yup, I durn goofed. Share properly, kids!
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-02-18 09:56:34 -08:00
Adam Williamson 4489a6cb3f Rejig GNOME welcome screen/g-i-s handling for GNOME 40
In GNOME 40, the new-user mode of g-i-s is gone and we get the
welcome tour where we would previously have seen that. This
should handle that, I hope. I probably messed up somewhere.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-02-18 09:54:06 -08:00
Adam Williamson 436e9cfdf2 Update GNOME 'getting started' needle and dismissal key
The new one isn't an app, so alt-f4 doesn't work. Esc does.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-02-18 09:38:52 -08:00
Adam Williamson 9392c66b45 Try hitting enter a few times at GNOME login screen if necessary
Another aarch64 robustness fix...sometimes hitting enter at GDM
just doesn't seem to work, let's give it three tries if needed.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-12-04 11:55:36 -08:00
Adam Williamson bcefdd8357 Wait a bit before typing password on GNOME login screen
Seems like this often fails when booting the desktop disk image
on aarch64 if we start typing right away.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-10-30 12:39:52 -07:00
Adam Williamson c7a1b94c84 Enable aarch64 disk image testing, related fixes
This sets us up to test the release-blocking aarch64 disk images
(Minimal, Server and Workstation). It also allows for testing
armhfp disk images on aarch64 worker hosts (though my testing of
that isn't going too well so far), and fixes the initial-setup
handling for a change upstream ('use password' is now the default
so we don't need to choose it). We rewire disk image deployment
test loading to work through the generic loader code rather than
using ENTRYPOINT, as it allows us to more gracefully handle
graphical (Workstation) vs. console (Server, Minimal), moving
the code for handling console initial-setup to a helper function
just like the code for gnome-initial-setup and having _console_
wait_login call it when appropriate. We also tweak desktop_vt a
bit because now we need to switch from a console running as test
to a desktop, which breaks the assumption that the highest
numbered session of user test is the desktop...

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-10-30 12:39:49 -07:00
Adam Williamson ea9ac508ac Fix check_desktop variable timeouts
I forgot that tries was configurable. Sigh. Convert it to a
timeout argument.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-18 14:54:48 -07:00
Lukáš Růžička f3d6a9574c Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.

While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.

So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-04-17 17:27:04 -07:00
Michel Normand cc5c85a3e4 Increase timeout for getting_started ppc64le f32
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
2020-04-03 19:38:04 +02:00
Adam Williamson 2aed12c6c1 Drop another old version check
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-01-10 14:28:49 -08:00
Adam Williamson b82a1dec6f Add test for QA:Testcase_Anaconda_User_Interface_VNC
This adds a test for QA:Testcase_Anaconda_User_Interface_VNC -
the VNC install test case. It's implemented as a server/client
pair, with the server booting from the Server DVD image with
`inst.vnc` and the client booting from the desktop base disk
image, setting up networking, then running Boxes to connect to
the server and run the install.

There are various little tweaks to test loading and logic to
handle this, mostly pretty clear. We also move the workaround
for 'spurious auth prompt appears on desktop after you switch
away to a VT and back' out of the desktop update test and into
the `desktop_vt` helper function, since now this test can hit
it as well. We enhance _graphical_wait_login to handle the boot
loader if needed (it has never needed to until now).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-11-05 14:46:10 -08:00
Adam Williamson bf7d6d0149 Wait out animation in 'no user' 'not GNOME' flow
See https://openqa.fedoraproject.org/tests/473215 - it failed
because we tried to click FINISH CONFIGURATION while it was
still animating downwards.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-10-21 10:56:31 -07:00
Adam Williamson 469a1395d0 Revise desktop background checks
Split this out of install_default, because it really is not a
part of that test and we do not want that test to fail because
the desktop background is wrong. Make it its own test module
and test suite instead. Don't do it on Rawhide, because we
really can't assert anything worthwhile about Rawhide at the
moment at least (this means the test runs but is a no-op and
will always pass on Rawhide, unfortunately). Move the needles
to a more appropriate location (this has nothing to do with
anaconda) and use 'background' not 'wallpaper' naming (that's
the name we use elsewhere in the project, e.g. package names).
Also, run the test on updates, and add an F29 needle for this
purpose.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-08-14 14:30:25 -07:00
Lukas Ruzicka d06b30e8dc Add new testcases and methods for release identification. 2019-07-30 15:45:02 -07:00
Adam Williamson 8d1d150798 Handle running update tests on Koji tasks
We quite often want to run the update tests on a Koji task (not
a Bodhi update) for some reason - usually to test a potential
fix for an issue, or at a maintainer's request to test a change
before it is merged upstream and officially sent out as an
update. Up till now I've always hacked up utils.pm on the
staging server by hand to do this, which is horrible. Together
with a commit to fedora_openqa, this should allow us to do it in
a nice, sane way via the CLI. It's mostly just tweaking the
"updates" repo setup in utils.pm as you'd expect, but there's a
bit of subtlety to it because of the installer tests that use
%ADVISORY% as a variable substitution in the disk image name;
you can't do something like `%ADVISORY or KOJITASK%`, sadly, so
I had to have almost-redundant variables ADVISORY, KOJITASK and
ADVISORY_OR_TASK (we could kinda just live with ADVISORY_OR_TASK
except I didn't want to drop ADVISORY as it's an unnecessary
change from previous behavior).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-01-29 11:54:15 +01:00
Adam Williamson 923267574d Drop the workaround for #1625572
It's fixed everywhere now, and the workaround can misfire if
the first g-i-s is slow quitting (see
https://openqa.fedoraproject.org/tests/280482)
2018-09-16 08:39:30 -07:00
Adam Williamson e2eb794a87 Tweak the workaround yet again (with soft fail this time)
Sigh, sorry, just perfecting. This way it won't fail when the
bug is fixed (hopefully).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-09-06 20:36:29 -07:00
Adam Williamson 7dff1843db Tweak that workaround again (forgot the version check)
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-09-06 19:53:07 -07:00
Adam Williamson 211cc221b3 Rejig the 1625572 workaround to just use an existing conditional
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-09-06 19:00:49 -07:00
Adam Williamson af6b9b15aa Gah, fix version testing in previous commit
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-09-06 18:23:13 -07:00
Adam Williamson 5a48086e61 Don't expect GDM when doing GNOME no-user install on F28+
GNOME now transitions straight from the g-i-s 'user creation'
mode to a logged-in desktop.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-09-06 18:21:12 -07:00
Adam Williamson e3887c5a83 Work around RHBZ#1625572 (both g-i-s modes running)
RHBZ#1625572 is for gnome-initial-setup running in 'first login'
mode after it's already run in 'user creation' mode (which isn't
meant to happen). This works around that so the subsequent tests
can run. We don't soft-fail because meh.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-09-06 17:59:40 -07:00
Adam Williamson c62a04bac8 Remove old workaround for g-i-s failing to run on F26
This hasn't been a problem for ages.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-09-06 17:49:03 -07:00
Adam Williamson cc2f1a3cec _graphical_wait_login: drop an old FAW workaround
This bug was fixed long ago, we no longer need the workaround.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-09-06 15:02:20 -07:00
Adam Williamson 64c5070b06 Simplify _graphical_wait_login by dropping a huge conditional
If USER_LOGIN is false we can just return; when we reach the
login screen. We don't need a huge conditional when we don't do
anything *after* it, in the false case.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-09-06 15:01:08 -07:00
Adam Williamson 05c9f4fbcd Make sure all `check_screen` calls have explicit timeout
Upstream is gonna change the default from 30 to 0, it seems:
https://github.com/os-autoinst/os-autoinst/pull/965
so let's go ahead and change these two cases where we have no
explicit timeout to have one.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-05-24 14:17:24 -07:00
Adam Williamson 70d3f0269c Of course, we have to actually auth *properly*...
...just clicking the button ain't gonna work. D'oh.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-03-28 22:17:33 -07:00
Adam Williamson 1f2e333043 Handle an auth dialog appearing after login on FAW
This will happen until a fedora-release PR is merged and sent
out for F28.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-03-28 21:24:31 -07:00
Adam Williamson e2a8c34e86 Tweak mouse placement in _graphical_wait_login for KDE browser
This mouse placement is in the middle of where the 'install
addon' popover appears in Firefox, and that seems like it
sometimes causes the popover to immediately disappear in KDE.
This is pretty corner-case-y so I don't wanna report it as a
bug, let's just tweak the cursor hiding location and see if it
solves the problem.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-03-16 15:10:34 -07:00
Adam Williamson 2a7b2923f7 Handle BGO#790811 (GNOME 'getting started' crash)
There's a bug causing the 'getting started' screen to crash.
This doesn't really make the system unusable, so treating it
as a soft failure seems appropriate, especially as this will
unblock all the post-install tests on Workstation.
2017-11-24 16:36:31 -08:00
Adam Williamson 7b7b63abc1 Workaround F26 base image g-i-s issue for upgrade tests too
Since April there's been some kind of issue in the F26 base
image which means gnome-initial-setup doesn't run on the first
user login (as it should). The F25 base image is fine. I've
not yet had the time to look into this.

I put a workaround in place to prevent this problem causing
false fails of update tests that boot from the F26 base image,
but didn't apply the same workaround to upgrade tests, which
is why upgrade tests from F26 Workstation always fail - they
expect g-i-s to run on first login (which happens after the
upgrade, in upgrade tests) and it doesn't. So let's just extend
the workaround to apply to upgrade tests too, for now, until we
can figure out why this happens.
2017-10-20 12:21:31 -07:00
Adam Williamson aca7de2861 Change up 'clean desktop' check again (use a util function)
Well, that OCR needle isn't working out so great, as it seems
to match when it shouldn't:

https://openqa.fedoraproject.org/tests/119217#step/_graphical_wait_login/5

So let's try another approach. Ditch the OCR needle and have a
function for checking we're at a clean desktop. It does the
normal needle match, but if we're on GNOME, it also tries
hitting alt+f1 and seeing if we're at the overview; if so, it
hits alt+f1 again (to go back to the desktop) and returns.
2017-07-10 11:47:07 -07:00
Adam Williamson 7d07147b7e Work around F26 base image bug: g-i-s failing to run
With the latest F26 base images, it seems like g-i-s fails to
run at first login. This is clearly some kind of bug somewhere
and I'll investigate it, but it shouldn't be causing the update
tests to fail - we can still validly run the tests with g-i-s
not running. So for now, adjust the _graphical_wait_login test
to tolerate this behaviour when running update tests.
2017-04-24 18:49:25 -07:00