Merge branch 'develop' into support_server_selinux
This commit is contained in:
commit
fd6242606e
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@
|
||||
.tox/
|
||||
.coverage
|
||||
coverage.xml
|
||||
.tidyall.d/
|
||||
|
16
.perltidyrc
Normal file
16
.perltidyrc
Normal file
@ -0,0 +1,16 @@
|
||||
# Workaround needed for handling non-ASCII in files.
|
||||
# # See <https://github.com/houseabsolute/perl-code-tidyall/issues/84>.
|
||||
--character-encoding=none
|
||||
--no-valign
|
||||
# 120 characters would be desired but it is not feasible right now
|
||||
#-l=120 # 120 characters per line
|
||||
-l=160
|
||||
-fbl # don't change blank lines
|
||||
-fnl # don't remove new lines
|
||||
-nsfs # no spaces before semicolons
|
||||
-baao # space after operators
|
||||
-bbao # space before operators
|
||||
-pt=2 # no spaces around ()
|
||||
-bt=2 # no spaces around []
|
||||
-sbt=2 # no spaces around {}
|
||||
-sct # stack closing tokens )}
|
@ -1,9 +1,13 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.2.0
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-json
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- repo: https://github.com/henryykt/pre-commit-perl
|
||||
rev: v0.0.5
|
||||
hooks:
|
||||
- id: perltidy
|
||||
|
3
.tidyallrc
Normal file
3
.tidyallrc
Normal file
@ -0,0 +1,3 @@
|
||||
[PerlTidy]
|
||||
select = **/*.pm
|
||||
argv = --profile=$ROOT/.perltidyrc
|
577
README_perltidy.md
Normal file
577
README_perltidy.md
Normal file
@ -0,0 +1,577 @@
|
||||
# Using perltidy, tidyall and tidy with the repository
|
||||
|
||||
## Purpose
|
||||
|
||||
Periodically it makes sense to be able to compare to our original upstream repository ([Fedora openQA](https://pagure.io/fedora-qa/os-autoinst-distri-fedora)) or even to cherry pick select improvements to our code. In the best case we might even contribute improvements or bug fixes back to Fedora. In order to do any of those things effectively it is good to keep the code we share with upstream as closely matching as possible.
|
||||
|
||||
After we forked from upstream the Fedora QA team [began using `perltidy`](https://pagure.io/fedora-qa/os-autoinst-distri-fedora/pull-request/271) to apply and enforce consistent coding stardards to their openQA test code. Additionally, they modified all existing code to implement these coding standards uniformly across the entire repository.
|
||||
|
||||
If we adopt the same standard we will benefit from being able to...
|
||||
|
||||
- directly compare code in our fork originating from upstream,
|
||||
- more easily import any existing upstream code
|
||||
- and we'll also improve our own code quality.
|
||||
|
||||
|
||||
## Pre-Requisites
|
||||
|
||||
- pre-commit - [https://pre-commit.com/](https://pre-commit.com/)
|
||||
- perltidy - [https://metacpan.org/dist/Perl-Tidy/view/bin/perltidy](https://metacpan.org/dist/Perl-Tidy/view/bin/perltidy)
|
||||
- tidyall - [https://metacpan.org/dist/Code-TidyAll/view/bin/tidyall](https://metacpan.org/dist/Code-TidyAll/view/bin/tidyall)
|
||||
|
||||
|
||||
Install above in your dev system via you preferred method. I used [`cpanm`](https://metacpan.org/dist/App-cpanminus/view/bin/cpanm) to install `Perl::Tidy` and `Code::TidyAll` in my macOS system and `cpanm` was installed with Homebrew.
|
||||
|
||||
|
||||
### install `cpanm`
|
||||
```
|
||||
$ brew install cpanminus
|
||||
==> Fetching cpanminus
|
||||
==> Downloading https://ghcr.io/v2/homebrew/core/cpanminus/manifests/1.7046
|
||||
Already downloaded: /Users/tcooper/Library/Caches/Homebrew/downloads/269f7cc3d0d07bf233458f3bf1d604ae2e8669d59eeb91e273bfda684987519f--cpanminus-1.7046.bottle_manifest.json
|
||||
==> Downloading https://ghcr.io/v2/homebrew/core/cpanminus/blobs/sha256:ab901b1645c97fa50ee52ecc4bf51bac7f8a8959abe664bbdd66c3d1a5
|
||||
Already downloaded: /Users/tcooper/Library/Caches/Homebrew/downloads/d3cf41a8aca082cd90acdfa8d79fc89e2b17d3ab13a2953b2bb58083a38a0779--cpanminus--1.7046.ventura.bottle.tar.gz
|
||||
==> Pouring cpanminus--1.7046.ventura.bottle.tar.gz
|
||||
==> Adding `/usr/bin/env perl` shebang to `cpanm`...
|
||||
🍺 /usr/local/Cellar/cpanminus/1.7046: 11 files, 1.2MB
|
||||
==> Running `brew cleanup cpanminus`...
|
||||
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
|
||||
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
|
||||
|
||||
$ which cpanm
|
||||
/usr/local/bin/cpanm
|
||||
```
|
||||
|
||||
**NOTE: Homebrew automatically configures your default shell for `cpanm`.**
|
||||
|
||||
|
||||
### install `perltidy`
|
||||
```
|
||||
$ cpanm --info Perl::Tidy
|
||||
SHANCOCK/Perl-Tidy-20221112.tar.gz
|
||||
$ cpanm Perl::Tidy
|
||||
--> Working on Perl::Tidy
|
||||
Fetching http://www.cpan.org/authors/id/S/SH/SHANCOCK/Perl-Tidy-20221112.tar.gz ... OK
|
||||
Configuring Perl-Tidy-20221112 ... OK
|
||||
Building and testing Perl-Tidy-20221112 ... OK
|
||||
Successfully installed Perl-Tidy-20221112
|
||||
1 distribution installed
|
||||
|
||||
$ which perltidy
|
||||
/Users/tcooper/perl5/bin/perltidy
|
||||
```
|
||||
|
||||
### install `tidyall`
|
||||
```
|
||||
$ cpanm --info Code::TidyAll
|
||||
DROLSKY/Code-TidyAll-0.83.tar.gz
|
||||
|
||||
$ cpanm Code::TidyAll
|
||||
--> Working on Code::TidyAll
|
||||
Fetching http://www.cpan.org/authors/id/D/DR/DROLSKY/Code-TidyAll-0.83.tar.gz ... OK
|
||||
Configuring Code-TidyAll-0.83 ... OK
|
||||
Building and testing Code-TidyAll-0.83 ... OK
|
||||
Successfully installed Code-TidyAll-0.83
|
||||
1 distribution installed
|
||||
|
||||
$ which tidyall
|
||||
/Users/tcooper/perl5/bin/tidyall
|
||||
```
|
||||
|
||||
In an RPM based system like Rocky Linux or Fedora `Perl::Tidy` and `Code::TidyAll` may be installable, along with all dependencies, directly from the provided repositories.
|
||||
|
||||
### install `cpanm` in Rocky Linux 8
|
||||
|
||||
```
|
||||
# dnf config-manager --set-enabled powertools
|
||||
# dnf install perl-App-cpanminus
|
||||
Rocky Linux 8 - AppStream 7.4 kB/s | 4.8 kB 00:00
|
||||
Rocky Linux 8 - BaseOS 4.3 kB/s | 4.3 kB 00:01
|
||||
Rocky Linux 8 - Extras 8.2 kB/s | 3.1 kB 00:00
|
||||
Rocky Linux 8 - PowerTools 8.4 kB/s | 4.8 kB 00:00
|
||||
Extra Packages for Enterprise Linux 8 - x86_64 17 kB/s | 8.7 kB 00:00
|
||||
Extra Packages for Enterprise Linux 8 - x86_64 841 kB/s | 13 MB 00:16
|
||||
Dependencies resolved.
|
||||
==================================================================================================================================
|
||||
Package Architecture Version Repository Size
|
||||
==================================================================================================================================
|
||||
Installing:
|
||||
perl-App-cpanminus noarch 1.7044-5.module+el8.6.0+961+8164b543 appstream 97 k
|
||||
perltidy noarch 20180220-1.el8 powertools 427 k
|
||||
Installing dependencies:
|
||||
annobin x86_64 10.67-3.el8 appstream 954 k
|
||||
|
||||
...<snip>...
|
||||
|
||||
unzip-6.0-46.el8.x86_64
|
||||
zip-3.0-23.el8.x86_64
|
||||
|
||||
Complete!
|
||||
|
||||
# which cpanm
|
||||
/usr/bin/cpanm
|
||||
|
||||
# which perltidy
|
||||
/usr/bin/perltidy
|
||||
```
|
||||
|
||||
### configure `.bash_profile` for `cpanm`
|
||||
|
||||
Append your `$HOME/.bash_profile` file with the following if not already setup...
|
||||
|
||||
```
|
||||
PATH="$HOME/perl5/bin${PATH:+:${PATH}}"; export PATH;
|
||||
PERL5LIB="$HOME/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
|
||||
PERL_LOCAL_LIB_ROOT="$HOME/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
|
||||
PERL_MB_OPT="--install_base \"$HOME/perl5\""; export PERL_MB_OPT;
|
||||
PERL_MM_OPT="INSTALL_BASE=$HOME/perl5"; export PERL_MM_OPT;
|
||||
```
|
||||
|
||||
|
||||
With `cpanm` installed you can follow steps above to install `Code::TidyAll`.
|
||||
|
||||
#### install `tidyall`
|
||||
|
||||
```
|
||||
$ cpanm -l ~/perl5 --info Code::TidyAll
|
||||
DROLSKY/Code-TidyAll-0.83.tar.gz
|
||||
|
||||
$ cpanm -l ~/perl5 Code::TidyAll
|
||||
--> Working on Code::TidyAll
|
||||
Fetching http://www.cpan.org/authors/id/D/DR/DROLSKY/Code-TidyAll-0.83.tar.gz ... OK
|
||||
Configuring Code-TidyAll-0.83 ... OK
|
||||
==> Found dependencies: List::SomeUtils, Specio, Specio::Library::String, Test::Class::Most, Time::Duration::Parse, Specio::Library::Path::Tiny, List::Compare, Try::Tiny, Test::Fatal, Date::Format, Specio::Library::Builtins, Capture::Tiny, Module::Runtime, Specio::Library::Numeric, IPC::Run3, Log::Any, Scope::Guard, Moo, Path::Tiny, Specio::Declare, Test::Warnings, Moo::Role, Test::Differences, lib::relative, Config::INI::Reader
|
||||
|
||||
...<snip>...
|
||||
|
||||
Building and testing Code-TidyAll-0.83 ... OK
|
||||
Successfully installed Code-TidyAll-0.83
|
||||
43 distributions installed
|
||||
|
||||
$ which tidyall
|
||||
~/perl5/bin/tidyall
|
||||
```
|
||||
|
||||
|
||||
### install `cpanm` and `perltidy` in Rocky Linux 9
|
||||
|
||||
```
|
||||
$ sudo dnf install perltidy perl-App-cpanminus
|
||||
Last metadata expiration check: 0:06:42 ago on Sun Feb 12 19:29:29 2023.
|
||||
Dependencies resolved.
|
||||
==================================================================================================================================
|
||||
Package Architecture Version Repository Size
|
||||
==================================================================================================================================
|
||||
Installing:
|
||||
perl-App-cpanminus noarch 1.7044-14.el9 appstream 86 k
|
||||
perltidy noarch 20210111-4.el9 crb 541 k
|
||||
|
||||
...<snip>...
|
||||
|
||||
perl-utils-5.32.1-479.el9.noarch perl-vmsish-1.04-479.el9.noarch
|
||||
perltidy-20210111-4.el9.noarch sombok-2.4.0-16.el9.x86_64
|
||||
systemtap-sdt-devel-4.7-2.el9.x86_64
|
||||
|
||||
Complete!
|
||||
|
||||
$ which cpanm
|
||||
/usr/bin/cpanm
|
||||
|
||||
$ which perltidy
|
||||
/usr/bin/perltidy
|
||||
```
|
||||
|
||||
With `cpanm` and `perltidy` installed you can follow steps above to install `Code::TidyAll`.
|
||||
|
||||
|
||||
### install `perltidy` and `tidyall` in Fedora 37 (`cpanm` not required)
|
||||
|
||||
```
|
||||
# dnf install perltidy perl-Code-TidyAll
|
||||
Last metadata expiration check: 0:03:32 ago on Mon 13 Feb 2023 03:59:12 AM UTC.
|
||||
Dependencies resolved.
|
||||
==================================================================================================================================
|
||||
Package Architecture Version Repository Size
|
||||
==================================================================================================================================
|
||||
Installing:
|
||||
perl-Code-TidyAll noarch 0.82-3.fc37 fedora 169 k
|
||||
perltidy noarch 20220613-2.fc37 fedora 655 k
|
||||
|
||||
...<snip>...
|
||||
|
||||
php-soap-8.1.15-1.fc37.x86_64 php-xml-8.1.15-1.fc37.x86_64
|
||||
subversion-1.14.2-8.fc37.x86_64 subversion-libs-1.14.2-8.fc37.x86_64
|
||||
utf8proc-2.7.0-3.fc37.x86_64
|
||||
|
||||
Complete!
|
||||
|
||||
# which perltidy
|
||||
/usr/bin/perltidy
|
||||
|
||||
# which tidyall
|
||||
/usr/bin/tidyall
|
||||
```
|
||||
|
||||
|
||||
## `perltidy` usage
|
||||
|
||||
With the `.perltidyrc` configuration adopted from upstream analysis (and repair) of Perl source files is possible. For example...
|
||||
|
||||
```
|
||||
$ perltidy -st main.pm > main.pm.tidy
|
||||
```
|
||||
|
||||
```
|
||||
$ diff main.pm main.pm.tidy
|
||||
36c36
|
||||
< my @a = @{ needle::tags($tag) };
|
||||
---
|
||||
> my @a = @{needle::tags($tag)};
|
||||
52c52
|
||||
< NEEDLE: for my $needle ( needle::all() ) {
|
||||
---
|
||||
> NEEDLE: for my $needle (needle::all()) {
|
||||
54c54
|
||||
< for my $tag ( @{$needle->{'tags'}} ) {
|
||||
---
|
||||
> for my $tag (@{$needle->{'tags'}}) {
|
||||
59c59
|
||||
< for my $value ( @{$valueref} ) {
|
||||
---
|
||||
> for my $value (@{$valueref}) {
|
||||
88c88
|
||||
< unregister_prefix_tags('DESKTOP', [ get_var('DESKTOP') ])
|
||||
---
|
||||
> unregister_prefix_tags('DESKTOP', [get_var('DESKTOP')]);
|
||||
94c94
|
||||
< my $langref = [ get_var('LANGUAGE') || 'english' ];
|
||||
---
|
||||
> my $langref = [get_var('LANGUAGE') || 'english'];
|
||||
198c198
|
||||
< if (! $partitioning || $partitioning ~~ ['guided_empty', 'guided_free_space']) {
|
||||
---
|
||||
> if (!$partitioning || $partitioning ~~ ['guided_empty', 'guided_free_space']) {
|
||||
202c202
|
||||
< $storage = "tests/disk_".$partitioning.".pm";
|
||||
---
|
||||
> $storage = "tests/disk_" . $partitioning . ".pm";
|
||||
206c206
|
||||
< if (get_var("ENCRYPT_PASSWORD")){
|
||||
---
|
||||
> if (get_var("ENCRYPT_PASSWORD")) {
|
||||
333c333
|
||||
< if (get_var("UEFI") &! get_var("NO_UEFI_POST") &! get_var("START_AFTER_TEST")) {
|
||||
---
|
||||
> if (get_var("UEFI") & !get_var("NO_UEFI_POST") & !get_var("START_AFTER_TEST")) {
|
||||
```
|
||||
|
||||
It should be evident from the above that without these changes it will become challenging to detect differences between our code and upstream code moving forward from the point where Fedora QA applied these code standards to all sources.
|
||||
|
||||
|
||||
## Using `tidy` to check and/or fix code
|
||||
|
||||
The utility wrapper `tidy` provided by Fedora in the upstream repository can be used to launch `tidyall` with options described in `tidy`.
|
||||
|
||||
For example, dropping an untidy'd copy of our `main.pm` as `foo.pm`...
|
||||
|
||||
```
|
||||
[geekotest@openqa-dev ~]$ cd /var/lib/openqa/tests/rocky
|
||||
|
||||
[geekotest@openqa-dev rocky]$ ./tidy --check foo.pm
|
||||
[checked] foo.pm
|
||||
*** needs tidying
|
||||
|
||||
[geekotest@openqa-dev rocky]$ ./tidy foo.pm
|
||||
[tidied] foo.pm
|
||||
|
||||
[geekotest@openqa-dev rocky]$ ls .tidyall.d/backups/
|
||||
foo.pm-20230212-203202.bak
|
||||
```
|
||||
|
||||
```
|
||||
[geekotest@openqa-dev rocky]$ diff .tidyall.d/backups/foo.pm-20230212-203202.bak foo.pm
|
||||
36c36
|
||||
< my @a = @{ needle::tags($tag) };
|
||||
---
|
||||
> my @a = @{needle::tags($tag)};
|
||||
52c52
|
||||
< NEEDLE: for my $needle ( needle::all() ) {
|
||||
---
|
||||
> NEEDLE: for my $needle (needle::all()) {
|
||||
54c54
|
||||
< for my $tag ( @{$needle->{'tags'}} ) {
|
||||
---
|
||||
> for my $tag (@{$needle->{'tags'}}) {
|
||||
59c59
|
||||
< for my $value ( @{$valueref} ) {
|
||||
---
|
||||
> for my $value (@{$valueref}) {
|
||||
88c88
|
||||
< unregister_prefix_tags('DESKTOP', [ get_var('DESKTOP') ])
|
||||
---
|
||||
> unregister_prefix_tags('DESKTOP', [get_var('DESKTOP')]);
|
||||
94c94
|
||||
< my $langref = [ get_var('LANGUAGE') || 'english' ];
|
||||
---
|
||||
> my $langref = [get_var('LANGUAGE') || 'english'];
|
||||
198c198
|
||||
< if (! $partitioning || $partitioning ~~ ['guided_empty', 'guided_free_space']) {
|
||||
---
|
||||
> if (!$partitioning || $partitioning ~~ ['guided_empty', 'guided_free_space']) {
|
||||
202c202
|
||||
< $storage = "tests/disk_".$partitioning.".pm";
|
||||
---
|
||||
> $storage = "tests/disk_" . $partitioning . ".pm";
|
||||
206c206
|
||||
< if (get_var("ENCRYPT_PASSWORD")){
|
||||
---
|
||||
> if (get_var("ENCRYPT_PASSWORD")) {
|
||||
333c333
|
||||
< if (get_var("UEFI") &! get_var("NO_UEFI_POST") &! get_var("START_AFTER_TEST")) {
|
||||
---
|
||||
> if (get_var("UEFI") & !get_var("NO_UEFI_POST") & !get_var("START_AFTER_TEST")) {
|
||||
```
|
||||
|
||||
|
||||
## Automatic application with pre-commit
|
||||
|
||||
While it's possible to manually apply these corrections using `tidy` when adding tests it is easy to forget this step and may be preferable to to use `pre-commit` to automatically check/apply these changes during normal workflow of developing and adding tests to openQA.
|
||||
|
||||
With `pre-commit` setup in your local clone you are able to do this easily for any new tests added to the repository.
|
||||
|
||||
For example...
|
||||
|
||||
```
|
||||
$ cp main.pm foo.pm
|
||||
$ git add foo.pm
|
||||
$ pre-commit run
|
||||
trim trailing whitespace.................................................Passed
|
||||
fix end of files.........................................................Passed
|
||||
check json...........................................(no files to check)Skipped
|
||||
check yaml...........................................(no files to check)Skipped
|
||||
check for added large files..............................................Passed
|
||||
perltidy.................................................................Failed
|
||||
- hook id: perltidy
|
||||
- files were modified by this hook
|
||||
```
|
||||
|
||||
...the issues are detected and automatically corrected...
|
||||
|
||||
```
|
||||
$ git --no-pager diff foo.pm
|
||||
diff --git a/foo.pm b/foo.pm
|
||||
index b8470550..7a873fe2 100644
|
||||
--- a/foo.pm
|
||||
+++ b/foo.pm
|
||||
@@ -33,7 +33,7 @@ testapi::set_distribution(fedoradistribution->new());
|
||||
# Stolen from openSUSE.
|
||||
sub unregister_needle_tags($) {
|
||||
my $tag = shift;
|
||||
- my @a = @{ needle::tags($tag) };
|
||||
+ my @a = @{needle::tags($tag)};
|
||||
for my $n (@a) { $n->unregister(); }
|
||||
}
|
||||
|
||||
@@ -49,14 +49,14 @@ sub unregister_needle_tags($) {
|
||||
# 'LANGUAGE-' at all.
|
||||
sub unregister_prefix_tags {
|
||||
my ($prefix, $valueref) = @_;
|
||||
- NEEDLE: for my $needle ( needle::all() ) {
|
||||
+ NEEDLE: for my $needle (needle::all()) {
|
||||
my $unregister = 0;
|
||||
- for my $tag ( @{$needle->{'tags'}} ) {
|
||||
+ for my $tag (@{$needle->{'tags'}}) {
|
||||
if ($tag =~ /^\Q$prefix/) {
|
||||
# We have at least one tag matching the prefix, so we
|
||||
# *MAY* want to un-register the needle
|
||||
$unregister = 1;
|
||||
- for my $value ( @{$valueref} ) {
|
||||
+ for my $value (@{$valueref}) {
|
||||
# At any point if we hit a prefix-value match, we
|
||||
# know we need to keep this needle and can skip
|
||||
# to the next
|
||||
@@ -85,13 +85,13 @@ sub cleanup_needles() {
|
||||
|
||||
# Unregister desktop needles of other desktops when DESKTOP is specified
|
||||
if (get_var('DESKTOP')) {
|
||||
- unregister_prefix_tags('DESKTOP', [ get_var('DESKTOP') ])
|
||||
+ unregister_prefix_tags('DESKTOP', [get_var('DESKTOP')]);
|
||||
}
|
||||
|
||||
# Unregister non-language-appropriate needles. See unregister_except_
|
||||
# tags for details; basically all needles with at least one LANGUAGE-
|
||||
# tag will be unregistered unless they match the current langauge.
|
||||
- my $langref = [ get_var('LANGUAGE') || 'english' ];
|
||||
+ my $langref = [get_var('LANGUAGE') || 'english'];
|
||||
unregister_prefix_tags('LANGUAGE', $langref);
|
||||
}
|
||||
$needle::cleanuphandler = \&cleanup_needles;
|
||||
@@ -195,15 +195,15 @@ sub load_install_tests() {
|
||||
my $partitioning = get_var('PARTITIONING');
|
||||
# if PARTITIONING is unset, or one of [...], use disk_guided_empty,
|
||||
# which is the simplest / 'default' case.
|
||||
- if (! $partitioning || $partitioning ~~ ['guided_empty', 'guided_free_space']) {
|
||||
+ if (!$partitioning || $partitioning ~~ ['guided_empty', 'guided_free_space']) {
|
||||
$storage = "tests/disk_guided_empty.pm";
|
||||
}
|
||||
else {
|
||||
- $storage = "tests/disk_".$partitioning.".pm";
|
||||
+ $storage = "tests/disk_" . $partitioning . ".pm";
|
||||
}
|
||||
autotest::loadtest $storage;
|
||||
|
||||
- if (get_var("ENCRYPT_PASSWORD")){
|
||||
+ if (get_var("ENCRYPT_PASSWORD")) {
|
||||
autotest::loadtest "tests/disk_guided_encrypted.pm";
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ sub load_postinstall_tests() {
|
||||
}
|
||||
autotest::loadtest $storagepost if ($storagepost);
|
||||
|
||||
- if (get_var("UEFI") &! get_var("NO_UEFI_POST") &! get_var("START_AFTER_TEST")) {
|
||||
+ if (get_var("UEFI") & !get_var("NO_UEFI_POST") & !get_var("START_AFTER_TEST")) {
|
||||
autotest::loadtest "tests/uefi_postinstall.pm";
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Automatic application of check/modify with git pre-commit hook
|
||||
|
||||
By adding the perltidy hook to the `pre-commit` configuration the hook is automatically run when trying to commit Perl code. If problems are found they are fixed and the the commit is rejected allowing you an opportunity to investigate before continuing.
|
||||
|
||||
### add file and attempt commit (rejected with file modified with perltidy)
|
||||
|
||||
```
|
||||
$ cp main.pm foo.pm
|
||||
$ git add foo.pm
|
||||
$ git commit -m "add foo.pm"
|
||||
trim trailing whitespace.................................................Passed
|
||||
fix end of files.........................................................Passed
|
||||
check json...........................................(no files to check)Skipped
|
||||
check yaml...........................................(no files to check)Skipped
|
||||
check for added large files..............................................Passed
|
||||
perltidy.................................................................Failed
|
||||
- hook id: perltidy
|
||||
- files were modified by this hook
|
||||
|
||||
$ git add foo.pm
|
||||
```
|
||||
|
||||
### commit now
|
||||
|
||||
```
|
||||
$ git add foo.pm
|
||||
$ git commit -m "add foo.pm"
|
||||
trim trailing whitespace.................................................Passed
|
||||
fix end of files.........................................................Passed
|
||||
check json...........................................(no files to check)Skipped
|
||||
check yaml...........................................(no files to check)Skipped
|
||||
check for added large files..............................................Passed
|
||||
perltidy.................................................................Passed
|
||||
[add_perltidy_support 19720035] add foo.pm
|
||||
1 file changed, 454 insertions(+)
|
||||
create mode 100644 foo.pm
|
||||
```
|
||||
|
||||
## Automatically tidying all existing code
|
||||
|
||||
`perltidy` and `tidy` can check specific files and the `pre-commit` hook can check any new files added to the repository in new commits.
|
||||
|
||||
How do we repair all of the existing code in the repository so that it matches upstream?
|
||||
|
||||
For that we can use `tidyall` for everything in the hierarchy of our openQA repository. For example...
|
||||
|
||||
```
|
||||
$ tidyall --check-only -a
|
||||
[checked] main.pm
|
||||
*** needs tidying
|
||||
[checked] tests/server_cockpit_default.pm
|
||||
*** needs tidying
|
||||
[checked] tests/disk_guided_delete_partial_postinstall.pm
|
||||
*** needs tidying
|
||||
|
||||
...<snip>...
|
||||
|
||||
[checked] lib/utils.pm
|
||||
*** needs tidying
|
||||
[checked] lib/anacondatest.pm
|
||||
*** needs tidying
|
||||
```
|
||||
|
||||
```
|
||||
$ tidyall -a
|
||||
[tidied] main.pm
|
||||
[tidied] tests/server_cockpit_default.pm
|
||||
[tidied] tests/disk_guided_delete_partial_postinstall.pm
|
||||
|
||||
...<snip>...
|
||||
|
||||
[tidied] lib/modularity.pm
|
||||
[tidied] lib/utils.pm
|
||||
[tidied] lib/anacondatest.pm
|
||||
```
|
||||
|
||||
```
|
||||
$ git status
|
||||
On branch add_perltidy_support
|
||||
Changes not staged for commit:
|
||||
(use "git add <file>..." to update what will be committed)
|
||||
(use "git restore <file>..." to discard changes in working directory)
|
||||
modified: lib/anaconda.pm
|
||||
modified: lib/anacondatest.pm
|
||||
modified: lib/bugzilla.pm
|
||||
|
||||
...<snip>...
|
||||
|
||||
modified: tests/upgrade_preinstall.pm
|
||||
modified: tests/upgrade_run.pm
|
||||
modified: tests/workstation_core_applications.pm
|
||||
|
||||
Untracked files:
|
||||
(use "git add <file>..." to include in what will be committed)
|
||||
.tidyall.d/
|
||||
.tidyallrc
|
||||
README_perltidy.md
|
||||
|
||||
no changes added to commit (use "git add" and/or "git commit -a")
|
||||
```
|
||||
|
||||
```
|
||||
$ git add $(git status -s | awk '/\.pm$/ {print $2}')
|
||||
|
||||
$ git commit -m "enforce standard coding on all Perl files"
|
||||
trim trailing whitespace.................................................Passed
|
||||
fix end of files.........................................................Passed
|
||||
check json...........................................(no files to check)Skipped
|
||||
check yaml...........................................(no files to check)Skipped
|
||||
check for added large files..............................................Passed
|
||||
perltidy.................................................................Passed
|
||||
[add_perltidy_support 61d57d45] enforce standard coding on all Perl files
|
||||
237 files changed, 950 insertions(+), 950 deletions(-)
|
||||
```
|
||||
|
||||
```
|
||||
$ git --no-pager log -n2
|
||||
commit 61d57d4591bc37798b87b54eae44a016538f8880 (HEAD -> add_perltidy_support)
|
||||
gpg: Signature made Sun Feb 12 14:59:40 2023 PST
|
||||
gpg: using RSA key 2CA999800D11C5946C9DBFEE52364D7BBCEB35B8
|
||||
gpg: Good signature from "Trevor Cooper <tcooper@sdsc.edu>" [ultimate]
|
||||
gpg: aka "Trevor Cooper <tcooper@ucsd.edu>" [ultimate]
|
||||
gpg: aka "Trevor Cooper <tcooper@rockylinux.org>" [ultimate]
|
||||
Author: Trevor Cooper <tcooper@rockylinux.org>
|
||||
Date: Sun Feb 12 14:59:37 2023 -0800
|
||||
|
||||
enforce standard coding on all Perl files
|
||||
|
||||
commit 4bfc29fc691568f36391560818fca0e7a3f7cac7
|
||||
gpg: Signature made Sun Feb 12 14:08:53 2023 PST
|
||||
gpg: using RSA key 2CA999800D11C5946C9DBFEE52364D7BBCEB35B8
|
||||
gpg: Good signature from "Trevor Cooper <tcooper@sdsc.edu>" [ultimate]
|
||||
gpg: aka "Trevor Cooper <tcooper@ucsd.edu>" [ultimate]
|
||||
gpg: aka "Trevor Cooper <tcooper@rockylinux.org>" [ultimate]
|
||||
Author: Trevor Cooper <tcooper@rockylinux.org>
|
||||
Date: Sun Feb 12 14:08:52 2023 -0800
|
||||
|
||||
add support for perltidy and pre-commit
|
||||
```
|
@ -28,8 +28,8 @@ sub select_disks {
|
||||
);
|
||||
my %iscsi = %{$args{iscsi}};
|
||||
# Anaconda hub
|
||||
assert_screen "anaconda_main_hub", 300; #
|
||||
# Damn animation delay can cause bad clicks here too - wait for it
|
||||
assert_screen "anaconda_main_hub", 300; #
|
||||
# Damn animation delay can cause bad clicks here too - wait for it
|
||||
sleep 1;
|
||||
assert_and_click "anaconda_main_hub_install_destination";
|
||||
|
||||
@ -150,7 +150,7 @@ sub custom_blivet_add_partition {
|
||||
assert_and_click "anaconda_blivet_size_unit";
|
||||
assert_and_click "anaconda_blivet_size_unit_mib";
|
||||
|
||||
send_key "shift-tab"; # input is one tab back from unit selection listbox
|
||||
send_key "shift-tab"; # input is one tab back from unit selection listbox
|
||||
|
||||
# size input can contain whole set of different values, so we can't match it with needle
|
||||
type_safely $args{size} . "\n";
|
||||
@ -178,7 +178,7 @@ sub custom_blivet_add_partition {
|
||||
sub custom_add_partition {
|
||||
# Used to add partition on Rocky custom-gui partitioning screen
|
||||
# in Anaconda. Should be called when custom-gui is displayed and free space is selected.
|
||||
# You can pass device type for partition (needle tagged anaconda_custom_devicetype_$devicetype should exist), size of that partition in MiBs, desired filesystem of that partition
|
||||
# You can pass device type for partition (needle tagged anaconda_custom_devicetype_$devicetype should exist), size of that partition in MiBs, desired filesystem of that partition
|
||||
# (anaconda_custom_part_fs_$filesystem should exist) and mountpoint of that partition (e. g. string "/boot").
|
||||
my %args = (
|
||||
devicetype => "",
|
||||
@ -368,7 +368,7 @@ sub get_full_repo {
|
||||
if ($repourl !~ m/^(nfs|hd:)/) {
|
||||
# Everything variant doesn't exist for modular composes atm,
|
||||
# only Server
|
||||
$repourl .= "/".get_var("ARCH")."/os";
|
||||
$repourl .= "/" . get_var("ARCH") . "/os";
|
||||
}
|
||||
return $repourl;
|
||||
}
|
||||
@ -483,7 +483,7 @@ sub report_bug_text {
|
||||
my $timestamp = time();
|
||||
#
|
||||
# First, collect the credentials.
|
||||
my $login = get_var("BUGZILLA_LOGIN");
|
||||
my $login = get_var("BUGZILLA_LOGIN");
|
||||
my $password = get_var("_SECRET_BUGZILLA_PASSWORD");
|
||||
my $apikey = get_var("_SECRET_BUGZILLA_APIKEY");
|
||||
# Choose item 1 - Report the bug.
|
||||
|
@ -21,7 +21,7 @@ sub post_fail_hook {
|
||||
if (check_screen "anaconda_error_report", 10) {
|
||||
assert_and_click "anaconda_error_report";
|
||||
$has_traceback = 1;
|
||||
} elsif (check_screen "anaconda_text_error", 10) { # also for text install
|
||||
} elsif (check_screen "anaconda_text_error", 10) { # also for text install
|
||||
type_string "1\n";
|
||||
$has_traceback = 1;
|
||||
}
|
||||
@ -73,21 +73,21 @@ sub post_fail_hook {
|
||||
}
|
||||
|
||||
if ($dracut) {
|
||||
upload_logs "/run/initramfs/rdsosreport.txt", failok=>1;
|
||||
upload_logs "/run/initramfs/rdsosreport.txt", failok => 1;
|
||||
# that's all that's really useful, so...
|
||||
return;
|
||||
}
|
||||
|
||||
upload_logs "/tmp/X.log", failok=>1;
|
||||
upload_logs "/tmp/anaconda.log", failok=>1;
|
||||
upload_logs "/tmp/packaging.log", failok=>1;
|
||||
upload_logs "/tmp/storage.log", failok=>1;
|
||||
upload_logs "/tmp/syslog", failok=>1;
|
||||
upload_logs "/tmp/program.log", failok=>1;
|
||||
upload_logs "/tmp/dnf.log", failok=>1;
|
||||
upload_logs "/tmp/dnf.librepo.log", failok=>1;
|
||||
upload_logs "/tmp/dnf.rpm.log", failok=>1;
|
||||
upload_logs "/tmp/dbus.log", failok=>1;
|
||||
upload_logs "/tmp/X.log", failok => 1;
|
||||
upload_logs "/tmp/anaconda.log", failok => 1;
|
||||
upload_logs "/tmp/packaging.log", failok => 1;
|
||||
upload_logs "/tmp/storage.log", failok => 1;
|
||||
upload_logs "/tmp/syslog", failok => 1;
|
||||
upload_logs "/tmp/program.log", failok => 1;
|
||||
upload_logs "/tmp/dnf.log", failok => 1;
|
||||
upload_logs "/tmp/dnf.librepo.log", failok => 1;
|
||||
upload_logs "/tmp/dnf.rpm.log", failok => 1;
|
||||
upload_logs "/tmp/dbus.log", failok => 1;
|
||||
|
||||
if ($has_traceback) {
|
||||
# Upload Anaconda traceback logs
|
||||
@ -131,7 +131,7 @@ sub root_console {
|
||||
# tty3 has a shell on all f31+ installer and live images
|
||||
send_key "ctrl-alt-f3";
|
||||
}
|
||||
console_login(user=>"root", timeout=>$args{timeout});
|
||||
console_login(user => "root", timeout => $args{timeout});
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -32,7 +32,7 @@ sub convert_to_bz_timestamp {
|
||||
|
||||
sub get_newest_bug {
|
||||
# This subroutine makes an API call to Bugzilla and
|
||||
# fetches the newest bug that have been created.
|
||||
# fetches the newest bug that have been created.
|
||||
# This will be the bug created by Anaconda in this
|
||||
# test run.
|
||||
my ($timestamp, $login) = @_;
|
||||
|
@ -24,7 +24,7 @@ sub start_cockpit {
|
||||
assert_screen "cockpit_login", 60;
|
||||
# this happened on early Modular Server composes...
|
||||
record_soft_failure "Unbranded Cockpit" if (match_has_tag "cockpit_login_unbranded");
|
||||
wait_still_screen(stilltime=>5, similarity_level=>45);
|
||||
wait_still_screen(stilltime => 5, similarity_level => 45);
|
||||
if ($login) {
|
||||
type_safely "root";
|
||||
wait_screen_change { send_key "tab"; };
|
||||
@ -57,6 +57,6 @@ sub check_updates {
|
||||
my $logfile = shift;
|
||||
sleep 2;
|
||||
my $checkresult = script_run "dnf check-update > $logfile";
|
||||
upload_logs "$logfile", failok=>1;
|
||||
return($checkresult);
|
||||
upload_logs "$logfile", failok => 1;
|
||||
return ($checkresult);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ sub x11_start_program {
|
||||
send_key "alt-f2";
|
||||
assert_screen "desktop_runner";
|
||||
type_string $program, 20;
|
||||
sleep 5; # because of KDE dialog - SUSE guys are doing the same!
|
||||
sleep 5; # because of KDE dialog - SUSE guys are doing the same!
|
||||
send_key "ret", 1;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ sub start_webui {
|
||||
disable_firefox_studies;
|
||||
type_string "startx /usr/bin/firefox -width 1024 -height 768 https://ipa001.test.openqa.fedoraproject.org\n";
|
||||
assert_screen ["freeipa_webui_login", $user_screen], 60;
|
||||
wait_still_screen(stilltime=>5, similarity_level=>45);
|
||||
wait_still_screen(stilltime => 5, similarity_level => 45);
|
||||
# softfail on kerberos ticket bugs meaning we get auto-logged in
|
||||
# as the requested user when we don't expect to be
|
||||
if (match_has_tag $user_screen) {
|
||||
|
@ -16,7 +16,7 @@ sub root_console {
|
||||
# Switch to a default or specified TTY and log in as root.
|
||||
my $self = shift;
|
||||
my %args = (
|
||||
tty => 1, # what TTY to login to
|
||||
tty => 1, # what TTY to login to
|
||||
@_);
|
||||
if (get_var("SERIAL_CONSOLE")) {
|
||||
# select the first virtio terminal, for now we assume we can
|
||||
@ -27,7 +27,7 @@ sub root_console {
|
||||
# For normal terminal emulation, use key combo to reach a tty
|
||||
send_key "ctrl-alt-f$args{tty}";
|
||||
}
|
||||
console_login; # Do the login.
|
||||
console_login; # Do the login.
|
||||
}
|
||||
|
||||
sub post_fail_hook {
|
||||
@ -43,7 +43,7 @@ sub post_fail_hook {
|
||||
assert_script_run "dhclient";
|
||||
}
|
||||
else {
|
||||
$self->root_console(tty=>6);
|
||||
$self->root_console(tty => 6);
|
||||
# fix up keyboard layout, if we failed before the test did this
|
||||
# itself; if it's already been done, should be safe, will just
|
||||
# fail and carry on
|
||||
@ -88,7 +88,7 @@ sub post_fail_hook {
|
||||
}
|
||||
|
||||
if ($dracut) {
|
||||
upload_logs "/run/initramfs/rdsosreport.txt", failok=>1;
|
||||
upload_logs "/run/initramfs/rdsosreport.txt", failok => 1;
|
||||
# that's all that's really useful, so...
|
||||
return;
|
||||
}
|
||||
@ -125,14 +125,14 @@ sub post_fail_hook {
|
||||
}
|
||||
|
||||
# Sometimes useful for diagnosing FreeIPA issues
|
||||
upload_logs "/etc/nsswitch.conf", failok=>1;
|
||||
upload_logs "/etc/nsswitch.conf", failok => 1;
|
||||
|
||||
if (get_var("FLAVOR") eq "updates-everything-boot-iso") {
|
||||
# for installer creation test
|
||||
script_run "df -h";
|
||||
upload_logs "/root/imgbuild/pylorax.log", failok=>1;
|
||||
upload_logs "/root/imgbuild/lorax.log", failok=>1;
|
||||
upload_logs "/root/imgbuild/program.log", failok=>1;
|
||||
upload_logs "/root/imgbuild/pylorax.log", failok => 1;
|
||||
upload_logs "/root/imgbuild/lorax.log", failok => 1;
|
||||
upload_logs "/root/imgbuild/program.log", failok => 1;
|
||||
}
|
||||
|
||||
if (get_var("TEST") eq "live_build") {
|
||||
@ -149,10 +149,10 @@ sub post_fail_hook {
|
||||
}
|
||||
}
|
||||
|
||||
# For update tests, let's do the update package info log stuff,
|
||||
# it may be useful for diagnosing the cause of the failure
|
||||
advisory_get_installed_packages;
|
||||
advisory_check_nonmatching_packages(fatal=>0);
|
||||
# For update tests, let's do the update package info log stuff,
|
||||
# it may be useful for diagnosing the cause of the failure
|
||||
advisory_get_installed_packages;
|
||||
advisory_check_nonmatching_packages(fatal => 0);
|
||||
|
||||
1;
|
||||
|
||||
|
@ -11,7 +11,7 @@ use utils;
|
||||
our @EXPORT = qw(parse_module_list is_listed);
|
||||
|
||||
# This subroutine takes the output from the dnf module list command
|
||||
# and deletes all unnecessary stuff and returns an array of hash
|
||||
# and deletes all unnecessary stuff and returns an array of hash
|
||||
# references where each hash consists of (module, stream, profile).
|
||||
# The subroutine only recognizes one profile but it is enough
|
||||
# for the sake of the modularity testing.
|
||||
@ -37,7 +37,7 @@ sub parse_module_list {
|
||||
sub is_listed {
|
||||
my ($module, $stream, $listref) = @_;
|
||||
my $found = 0;
|
||||
foreach (@{ $listref }) {
|
||||
foreach (@{$listref}) {
|
||||
if ($_->{module} eq $module and $_->{stream} eq $stream) {
|
||||
$found = 1;
|
||||
}
|
||||
|
154
lib/utils.pm
154
lib/utils.pm
@ -22,9 +22,9 @@ sub run_with_error_check {
|
||||
# by using 'unless' and 'expect_not_found=>1' here we avoid
|
||||
# the web UI showing each failure to see the error message as
|
||||
# a 'failed match'
|
||||
die "Error screen appeared" unless (wait_serial($error_screen, timeout=>5, expect_not_found=>1));
|
||||
die "Error screen appeared" unless (wait_serial($error_screen, timeout => 5, expect_not_found => 1));
|
||||
$func->();
|
||||
die "Error screen appeared" unless (wait_serial($error_screen, timeout=>5, expect_not_found=>1));
|
||||
die "Error screen appeared" unless (wait_serial($error_screen, timeout => 5, expect_not_found => 1));
|
||||
}
|
||||
else {
|
||||
die "Error screen appeared" if (check_screen $error_screen, 5);
|
||||
@ -40,7 +40,7 @@ sub type_safely {
|
||||
type_string($string, wait_screen_change => 3, max_interval => 20);
|
||||
# similarity level 45 as there will commonly be a flashing
|
||||
# cursor and the default level (47) is slightly too tight
|
||||
wait_still_screen(stilltime=>2, similarity_level=>45);
|
||||
wait_still_screen(stilltime => 2, similarity_level => 45);
|
||||
}
|
||||
|
||||
# high-level 'type this string extremely safely and rather slow'
|
||||
@ -50,7 +50,7 @@ sub type_very_safely {
|
||||
type_string($string, wait_screen_change => 1, max_interval => 1);
|
||||
# similarity level 45 as there will commonly be a flashing
|
||||
# cursor and the default level (47) is slightly too tight
|
||||
wait_still_screen(stilltime=>5, similarity_level=>45);
|
||||
wait_still_screen(stilltime => 5, similarity_level => 45);
|
||||
}
|
||||
|
||||
sub get_release_number {
|
||||
@ -60,13 +60,13 @@ sub get_release_number {
|
||||
my $version = get_var("VERSION");
|
||||
my $rawrel = get_var("RAWREL", "Rawhide");
|
||||
return $rawrel if ($version eq "Rawhide");
|
||||
return $version
|
||||
return $version;
|
||||
}
|
||||
|
||||
sub get_version_major {
|
||||
my $version = get_var('VERSION');
|
||||
my $version_major = substr($version, 0, index($version, q/./));
|
||||
return $version_major
|
||||
my $version = get_var('VERSION');
|
||||
my $version_major = substr($version, 0, index($version, q/./));
|
||||
return $version_major;
|
||||
}
|
||||
|
||||
sub get_code_name {
|
||||
@ -74,11 +74,11 @@ sub get_code_name {
|
||||
my $version = get_var('VERSION');
|
||||
my $version_major = get_version_major;
|
||||
|
||||
given($version_major){
|
||||
when ('9') { $code_name = 'Blue Onyx'; }
|
||||
when ('10') { $code_name = 'Smoky Quartz'; }
|
||||
when ('11') { $code_name = 'Lavender Calcite'; }
|
||||
default{
|
||||
given ($version_major) {
|
||||
when ('9') { $code_name = 'Blue Onyx'; }
|
||||
when ('10') { $code_name = 'Smoky Quartz'; }
|
||||
when ('11') { $code_name = 'Lavender Calcite'; }
|
||||
default {
|
||||
$code_name = 'Green Obsidian';
|
||||
}
|
||||
}
|
||||
@ -98,9 +98,9 @@ sub desktop_vt {
|
||||
# stop as soon as any command fails, so we use ||: to make the
|
||||
# first grep return 0 even if it matches nothing
|
||||
eval { $xout = script_output ' loginctl | grep test ||:; ps -e | egrep "(gnome-session|Xwayland|Xorg)" | grep -o tty[0-9]' };
|
||||
my $tty = 1; # default
|
||||
my $tty = 1; # default
|
||||
while ($xout =~ /tty(\d)/g) {
|
||||
$tty = $1; # most recent match is probably best
|
||||
$tty = $1; # most recent match is probably best
|
||||
}
|
||||
send_key "ctrl-alt-f${tty}";
|
||||
# work around https://gitlab.gnome.org/GNOME/gnome-software/issues/582
|
||||
@ -129,7 +129,7 @@ sub boot_to_login_screen {
|
||||
$args{timeout} //= 300;
|
||||
if (testapi::is_serial_terminal) {
|
||||
# For serial console, just wait for the login prompt
|
||||
unless (wait_serial "login:", timeout=>$args{timeout}) {
|
||||
unless (wait_serial "login:", timeout => $args{timeout}) {
|
||||
die "No login prompt shown on serial console.";
|
||||
}
|
||||
}
|
||||
@ -140,14 +140,14 @@ sub boot_to_login_screen {
|
||||
# The following is true for non-serial console.
|
||||
my $count = 5;
|
||||
while (check_screen("login_screen", 3) && $count > 0) {
|
||||
sleep 5;
|
||||
$count -= 1;
|
||||
sleep 5;
|
||||
$count -= 1;
|
||||
}
|
||||
assert_screen "login_screen", $args{timeout};
|
||||
if (match_has_tag "graphical_login") {
|
||||
wait_still_screen 10, 30;
|
||||
assert_screen "login_screen";
|
||||
}
|
||||
assert_screen "login_screen", $args{timeout};
|
||||
if (match_has_tag "graphical_login") {
|
||||
wait_still_screen 10, 30;
|
||||
assert_screen "login_screen";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ sub desktop_switch_layout {
|
||||
# if already selected, we're good
|
||||
return if (check_screen "${environment}_layout_${layout}", 3);
|
||||
# otherwise we need to switch
|
||||
my $switcher = "alt-shift"; # anaconda
|
||||
my $switcher = "alt-shift"; # anaconda
|
||||
$switcher = "super-spc" if $environment eq 'gnome';
|
||||
# KDE? not used yet
|
||||
send_key $switcher;
|
||||
@ -188,7 +188,7 @@ sub desktop_switch_layout {
|
||||
sub _console_login_finish {
|
||||
# The check differs according to the console used.
|
||||
if (testapi::is_serial_terminal) {
|
||||
unless (wait_serial("-bash-.*[#\$]", timeout=>5, expect_not_found=>1)) {
|
||||
unless (wait_serial("-bash-.*[#\$]", timeout => 5, expect_not_found => 1)) {
|
||||
record_soft_failure "It looks like profile sourcing failed";
|
||||
}
|
||||
}
|
||||
@ -219,7 +219,7 @@ sub console_login {
|
||||
# enable a new proper login based on the user variable.
|
||||
if (get_var("SERIAL_CONSOLE")) {
|
||||
# Check for the usual prompt.
|
||||
if (wait_serial("~\][#\$]", timeout=>5, quiet=>1)) {
|
||||
if (wait_serial("~\][#\$]", timeout => 5, quiet => 1)) {
|
||||
type_string "logout\n";
|
||||
# Wait a bit to let the logout properly finish.
|
||||
sleep 10;
|
||||
@ -233,7 +233,7 @@ sub console_login {
|
||||
# Let's perform a simple login test. This is the same as
|
||||
# whoami, but has the advantage of existing in installer env
|
||||
assert_script_run "id -un";
|
||||
unless (wait_serial $args{user}, timeout=>5) {
|
||||
unless (wait_serial $args{user}, timeout => 5) {
|
||||
die "Logging onto the serial console has failed.";
|
||||
}
|
||||
}
|
||||
@ -392,8 +392,8 @@ sub do_bootloader {
|
||||
# in SLOF usb-xhci driver failed sometimes in powerpc
|
||||
type_safely " $args{params}";
|
||||
}
|
||||
save_screenshot; # for debug purpose
|
||||
# ctrl-X boots from grub editor mode
|
||||
save_screenshot; # for debug purpose
|
||||
# ctrl-X boots from grub editor mode
|
||||
send_key "ctrl-x";
|
||||
# return boots all other cases
|
||||
send_key "ret";
|
||||
@ -515,7 +515,7 @@ sub _repo_setup_compose {
|
||||
assert_script_run 'dnf config-manager --set-disabled updates-testing updates';
|
||||
# script_run returns the exit code, so 'unless' here means 'if the file exists'
|
||||
unless (script_run 'test -f /etc/yum.repos.d/fedora-updates-modular.repo') {
|
||||
assert_script_run 'dnf config-manager --set-disabled updates-testing-modular updates-modular';
|
||||
assert_script_run 'dnf config-manager --set-disabled updates-testing-modular updates-modular';
|
||||
}
|
||||
# we use script_run here as the rawhide and modular repo files
|
||||
# won't always exist and we don't want to bother testing or
|
||||
@ -525,9 +525,9 @@ sub _repo_setup_compose {
|
||||
script_run "sed -i -e 's,^metalink,#metalink,g' -e 's,^mirrorlist,#mirrorlist,g' -e 's,^#baseurl.*basearch,baseurl=${location}/Modular/\$basearch,g' -e 's,^#baseurl.*source,baseurl=${location}/Modular/source,g' /etc/yum.repos.d/{fedora-modular,fedora-rawhide-modular}.repo", 0;
|
||||
|
||||
# this can be used for debugging if something is going wrong
|
||||
# unless (script_run 'pushd /etc/yum.repos.d && tar czvf yumreposd.tar.gz * && popd') {
|
||||
# upload_logs "/etc/yum.repos.d/yumreposd.tar.gz";
|
||||
# }
|
||||
# unless (script_run 'pushd /etc/yum.repos.d && tar czvf yumreposd.tar.gz * && popd') {
|
||||
# upload_logs "/etc/yum.repos.d/yumreposd.tar.gz";
|
||||
# }
|
||||
}
|
||||
|
||||
sub _repo_setup_updates {
|
||||
@ -538,9 +538,9 @@ sub _repo_setup_updates {
|
||||
my $currrel = get_var("CURRREL", "0");
|
||||
repos_mirrorlist();
|
||||
# this can be used for debugging repo config if something is wrong
|
||||
# unless (script_run 'pushd /etc/yum.repos.d && tar czvf yumreposd.tar.gz * && popd') {
|
||||
# upload_logs "/etc/yum.repos.d/yumreposd.tar.gz";
|
||||
# }
|
||||
# unless (script_run 'pushd /etc/yum.repos.d && tar czvf yumreposd.tar.gz * && popd') {
|
||||
# upload_logs "/etc/yum.repos.d/yumreposd.tar.gz";
|
||||
# }
|
||||
if ($version > $currrel) {
|
||||
# Disable updates-testing so other bad updates don't break us
|
||||
# this will do nothing on upgrade tests as we're on a stable
|
||||
@ -651,11 +651,11 @@ sub console_initial_setup {
|
||||
# Set timezone
|
||||
type_string "2\n";
|
||||
wait_still_screen 5;
|
||||
type_string "1\n"; # Set timezone
|
||||
type_string "1\n"; # Set timezone
|
||||
wait_still_screen 5;
|
||||
type_string "1\n"; # Europe
|
||||
type_string "1\n"; # Europe
|
||||
wait_still_screen 5;
|
||||
type_string "37\n"; # Prague
|
||||
type_string "37\n"; # Prague
|
||||
wait_still_screen 7;
|
||||
|
||||
# Set root password
|
||||
@ -671,14 +671,14 @@ sub console_initial_setup {
|
||||
# Create user
|
||||
type_string "5\n";
|
||||
wait_still_screen 5;
|
||||
type_string "1\n"; # create new
|
||||
type_string "1\n"; # create new
|
||||
wait_still_screen 5;
|
||||
type_string "3\n"; # set username
|
||||
type_string "3\n"; # set username
|
||||
wait_still_screen 5;
|
||||
type_string get_var("USER_LOGIN", "test");
|
||||
send_key "ret";
|
||||
wait_still_screen 5;
|
||||
type_string "5\n"; # set password
|
||||
type_string "5\n"; # set password
|
||||
wait_still_screen 5;
|
||||
type_string get_var("USER_PASSWORD", "weakpassword");
|
||||
send_key "ret";
|
||||
@ -686,13 +686,13 @@ sub console_initial_setup {
|
||||
type_string get_var("USER_PASSWORD", "weakpassword");
|
||||
send_key "ret";
|
||||
wait_still_screen 5;
|
||||
type_string "6\n"; # make him an administrator
|
||||
type_string "6\n"; # make him an administrator
|
||||
wait_still_screen 5;
|
||||
type_string "c\n";
|
||||
wait_still_screen 7;
|
||||
|
||||
assert_screen "console_initial_SETUP_DONE", 30;
|
||||
type_string "c\n"; # continue
|
||||
type_string "c\n"; # continue
|
||||
}
|
||||
|
||||
sub handle_welcome_screen {
|
||||
@ -735,18 +735,18 @@ sub gnome_initial_setup {
|
||||
# https://fedoraproject.org//wiki/Changes/ReduceInitialSetupRedundancy
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1474787 ,
|
||||
# except 'language' is never *really* skipped (see above)
|
||||
@nexts = grep {$_ ne 'keyboard'} @nexts;
|
||||
@nexts = grep {$_ ne 'timezone'} @nexts;
|
||||
@nexts = grep { $_ ne 'keyboard' } @nexts;
|
||||
@nexts = grep { $_ ne 'timezone' } @nexts;
|
||||
}
|
||||
else {
|
||||
# 'timezone' and 'software' are suppressed for the 'existing user'
|
||||
# form of g-i-s
|
||||
@nexts = grep {$_ ne 'software'} @nexts;
|
||||
@nexts = grep {$_ ne 'timezone'} @nexts;
|
||||
@nexts = grep { $_ ne 'software' } @nexts;
|
||||
@nexts = grep { $_ ne 'timezone' } @nexts;
|
||||
}
|
||||
# 'additional software sources' screen does not display on F28+:
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=794825
|
||||
@nexts = grep {$_ ne 'software'} @nexts;
|
||||
@nexts = grep { $_ ne 'software' } @nexts;
|
||||
|
||||
# note: in g-i-s 3.37.91 and later, the first screen in systemwide
|
||||
# mode has a "Start Setup" button, not a "Next" button
|
||||
@ -761,13 +761,13 @@ sub gnome_initial_setup {
|
||||
# wait a bit in case of animation
|
||||
wait_still_screen 3;
|
||||
# one more check for frickin auth_required
|
||||
if (check_screen "auth_required") {
|
||||
if (check_screen "auth_required") {
|
||||
record_soft_failure "Unexpected authentication required: https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/106";
|
||||
send_key "esc";
|
||||
}
|
||||
# GDM 3.24.1 dumps a cursor in the middle of the screen here...
|
||||
mouse_hide if ($args{prelogin});
|
||||
for my $n (1..scalar(@nexts)) {
|
||||
for my $n (1 .. scalar(@nexts)) {
|
||||
# click 'Next' $nexts times, moving the mouse to avoid
|
||||
# highlight problems, sleeping to give it time to get
|
||||
# to the next screen between clicks
|
||||
@ -794,7 +794,7 @@ sub gnome_initial_setup {
|
||||
unless (get_var("VNC_CLIENT")) {
|
||||
# click 'Skip' one time (this is the 'goa' screen). We don't
|
||||
# get it on VNC_CLIENT case as network isn't working (yet)
|
||||
mouse_set(100,100);
|
||||
mouse_set(100, 100);
|
||||
wait_screen_change { assert_and_click "skip_button"; };
|
||||
}
|
||||
send_key "ret";
|
||||
@ -843,7 +843,7 @@ sub anaconda_create_user {
|
||||
@_
|
||||
);
|
||||
my $user_login = get_var("USER_LOGIN") || "test";
|
||||
assert_and_click("anaconda_install_user_creation", timeout=>$args{timeout});
|
||||
assert_and_click("anaconda_install_user_creation", timeout => $args{timeout});
|
||||
assert_screen "anaconda_install_user_creation_screen";
|
||||
# wait out animation
|
||||
wait_still_screen 2;
|
||||
@ -901,21 +901,21 @@ sub check_desktop {
|
||||
}
|
||||
|
||||
sub download_modularity_tests {
|
||||
# Download the modularity test script, place in the system and then
|
||||
# modify the access rights to make it executable.
|
||||
# Download the modularity test script, place in the system and then
|
||||
# modify the access rights to make it executable.
|
||||
my ($whitelist) = @_;
|
||||
# we need python3-yaml for the script to run
|
||||
assert_script_run 'dnf -y install python3-yaml', 180;
|
||||
assert_script_run 'curl -o /root/test.py https://pagure.io/fedora-qa/modularity_testing_scripts/raw/master/f/modular_functions.py';
|
||||
if ($whitelist eq 'whitelist') {
|
||||
assert_script_run 'curl -o /root/whitelist https://pagure.io/fedora-qa/modularity_testing_scripts/raw/master/f/whitelist';
|
||||
assert_script_run 'curl -o /root/whitelist https://pagure.io/fedora-qa/modularity_testing_scripts/raw/master/f/whitelist';
|
||||
}
|
||||
assert_script_run 'chmod 755 /root/test.py';
|
||||
}
|
||||
|
||||
sub quit_firefox {
|
||||
# Quit Firefox, handling the 'close multiple tabs' warning screen if
|
||||
# it shows up
|
||||
# Quit Firefox, handling the 'close multiple tabs' warning screen if
|
||||
# it shows up
|
||||
send_key "ctrl-q";
|
||||
# expect to get to either the tabs warning or a console
|
||||
if (check_screen ["user_console", "root_console", "firefox_close_tabs"], 30) {
|
||||
@ -927,14 +927,14 @@ sub quit_firefox {
|
||||
}
|
||||
|
||||
sub start_with_launcher {
|
||||
# Get the name of the needle with a launcher, find the launcher in the menu
|
||||
# and click on it to start the application. This function works for the
|
||||
# Gnome desktop.
|
||||
# Get the name of the needle with a launcher, find the launcher in the menu
|
||||
# and click on it to start the application. This function works for the
|
||||
# Gnome desktop.
|
||||
|
||||
# $launcher holds the launcher needle, but some of the apps are hidden in a submenu
|
||||
# so this must be handled first to find the launcher needle.
|
||||
|
||||
my ($launcher,$submenu,$group) = @_;
|
||||
my ($launcher, $submenu, $group) = @_;
|
||||
$submenu //= '';
|
||||
$group //= '';
|
||||
my $desktop = get_var('DESKTOP');
|
||||
@ -979,7 +979,7 @@ sub start_with_launcher {
|
||||
assert_and_click $launcher;
|
||||
wait_still_screen 5;
|
||||
}
|
||||
elsif ($desktop eq 'kde'){
|
||||
elsif ($desktop eq 'kde') {
|
||||
# Click on the KDE launcher icon
|
||||
assert_and_click 'kde_menu_launcher';
|
||||
wait_still_screen 2;
|
||||
@ -1006,7 +1006,7 @@ sub start_with_launcher {
|
||||
|
||||
|
||||
sub quit_with_shortcut {
|
||||
# Quit the application using the Alt-F4 keyboard shortcut
|
||||
# Quit the application using the Alt-F4 keyboard shortcut
|
||||
send_key 'alt-f4';
|
||||
wait_still_screen 5;
|
||||
assert_screen 'workspace';
|
||||
@ -1035,12 +1035,12 @@ sub advisory_get_installed_packages {
|
||||
# occasionally, for some reason, it's unhappy about sorting;
|
||||
# we shouldn't fail the test in this case, just upload the
|
||||
# files so we can see why...
|
||||
upload_logs "/tmp/allpkgs.txt", failok=>1;
|
||||
upload_logs "/var/log/updatepkgs.txt", failok=>1;
|
||||
upload_logs "/tmp/allpkgs.txt", failok => 1;
|
||||
upload_logs "/var/log/updatepkgs.txt", failok => 1;
|
||||
}
|
||||
# we'll try and upload the output even if comm 'failed', as it
|
||||
# does in fact still write it in some cases
|
||||
upload_logs "/var/log/testedpkgs.txt", failok=>1;
|
||||
upload_logs "/var/log/testedpkgs.txt", failok => 1;
|
||||
}
|
||||
|
||||
sub advisory_check_nonmatching_packages {
|
||||
@ -1068,8 +1068,8 @@ sub advisory_check_nonmatching_packages {
|
||||
script_run 'for pkg in $(cat /var/log/updatepkgnames.txt); do rpm -q $pkg && rpm -q $pkg --last | head -1 | cut -d" " -f1 | xargs rpm -q --qf "%{SOURCERPM} %{EPOCH} %{NAME}-%{VERSION}-%{RELEASE}\n" >> /tmp/installedupdatepkgs.txt; done';
|
||||
script_run 'sort -u -o /tmp/installedupdatepkgs.txt /tmp/installedupdatepkgs.txt';
|
||||
# for debugging, may as well always upload these, can't hurt anything
|
||||
upload_logs "/tmp/installedupdatepkgs.txt", failok=>1;
|
||||
upload_logs "/var/log/updatepkgs.txt", failok=>1;
|
||||
upload_logs "/tmp/installedupdatepkgs.txt", failok => 1;
|
||||
upload_logs "/var/log/updatepkgs.txt", failok => 1;
|
||||
# if any line appears in installedupdatepkgs.txt but not updatepkgs.txt,
|
||||
# we have a problem.
|
||||
if (script_run 'comm -23 /tmp/installedupdatepkgs.txt /var/log/updatepkgs.txt > /var/log/installednotupdatedpkgs.txt') {
|
||||
@ -1081,7 +1081,7 @@ sub advisory_check_nonmatching_packages {
|
||||
# this exits 1 if the file is zero-length, 0 if it's longer
|
||||
# if it's 0, that's *BAD*: we want to upload the file and fail
|
||||
unless (script_run 'test -s /var/log/installednotupdatedpkgs.txt') {
|
||||
upload_logs "/var/log/installednotupdatedpkgs.txt", failok=>1;
|
||||
upload_logs "/var/log/installednotupdatedpkgs.txt", failok => 1;
|
||||
my $message = "Package(s) from update not installed when it should have been! See installednotupdatedpkgs.txt";
|
||||
if ($args{fatal}) {
|
||||
set_var("_ACNMP_DONE", "1");
|
||||
@ -1134,7 +1134,7 @@ sub select_rescue_mode {
|
||||
}
|
||||
}
|
||||
|
||||
assert_screen "rescue_select", 180; # it takes time to start anaconda
|
||||
assert_screen "rescue_select", 180; # it takes time to start anaconda
|
||||
}
|
||||
|
||||
sub copy_devcdrom_as_isofile {
|
||||
@ -1289,10 +1289,10 @@ sub check_prerelease {
|
||||
assert_screen "prerelease_note";
|
||||
}
|
||||
elsif ($prerelease == 0) {
|
||||
# If the prerelease note is shown, where it should not be, die!
|
||||
if (check_screen "prerelease_note") {
|
||||
# If the prerelease note is shown, where it should not be, die!
|
||||
if (check_screen "prerelease_note") {
|
||||
die "The PRERELEASE tag is shown, but it should NOT be.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1372,12 +1372,12 @@ sub click_unwanted_notifications {
|
||||
my @closed;
|
||||
while ($count > 0 && check_screen "desktop_update_notification_popup", 5) {
|
||||
$count -= 1;
|
||||
push (@closed, 'update');
|
||||
push(@closed, 'update');
|
||||
click_lastmatch;
|
||||
}
|
||||
if (check_screen "akonadi_migration_agent_running", 5) {
|
||||
click_lastmatch;
|
||||
push (@closed, 'akonadi');
|
||||
push(@closed, 'akonadi');
|
||||
}
|
||||
return @closed;
|
||||
}
|
||||
@ -1400,7 +1400,7 @@ sub register_application {
|
||||
sub solidify_wallpaper {
|
||||
my $desktop = get_var("DESKTOP");
|
||||
if ($desktop eq "kde") {
|
||||
# Run the Desktop settings
|
||||
# Run the Desktop settings
|
||||
# FIXME workaround a weird bug where alt-d-s does something
|
||||
# different until you right click on the desktop:
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1933118
|
||||
|
20
main.pm
20
main.pm
@ -33,7 +33,7 @@ testapi::set_distribution(fedoradistribution->new());
|
||||
# Stolen from openSUSE.
|
||||
sub unregister_needle_tags($) {
|
||||
my $tag = shift;
|
||||
my @a = @{ needle::tags($tag) };
|
||||
my @a = @{needle::tags($tag)};
|
||||
for my $n (@a) { $n->unregister(); }
|
||||
}
|
||||
|
||||
@ -49,14 +49,14 @@ sub unregister_needle_tags($) {
|
||||
# 'LANGUAGE-' at all.
|
||||
sub unregister_prefix_tags {
|
||||
my ($prefix, $valueref) = @_;
|
||||
NEEDLE: for my $needle ( needle::all() ) {
|
||||
NEEDLE: for my $needle (needle::all()) {
|
||||
my $unregister = 0;
|
||||
for my $tag ( @{$needle->{'tags'}} ) {
|
||||
for my $tag (@{$needle->{'tags'}}) {
|
||||
if ($tag =~ /^\Q$prefix/) {
|
||||
# We have at least one tag matching the prefix, so we
|
||||
# *MAY* want to un-register the needle
|
||||
$unregister = 1;
|
||||
for my $value ( @{$valueref} ) {
|
||||
for my $value (@{$valueref}) {
|
||||
# At any point if we hit a prefix-value match, we
|
||||
# know we need to keep this needle and can skip
|
||||
# to the next
|
||||
@ -85,13 +85,13 @@ sub cleanup_needles() {
|
||||
|
||||
# Unregister desktop needles of other desktops when DESKTOP is specified
|
||||
if (get_var('DESKTOP')) {
|
||||
unregister_prefix_tags('DESKTOP', [ get_var('DESKTOP') ])
|
||||
unregister_prefix_tags('DESKTOP', [get_var('DESKTOP')]);
|
||||
}
|
||||
|
||||
# Unregister non-language-appropriate needles. See unregister_except_
|
||||
# tags for details; basically all needles with at least one LANGUAGE-
|
||||
# tag will be unregistered unless they match the current langauge.
|
||||
my $langref = [ get_var('LANGUAGE') || 'english' ];
|
||||
my $langref = [get_var('LANGUAGE') || 'english'];
|
||||
unregister_prefix_tags('LANGUAGE', $langref);
|
||||
}
|
||||
$needle::cleanuphandler = \&cleanup_needles;
|
||||
@ -195,15 +195,15 @@ sub load_install_tests() {
|
||||
my $partitioning = get_var('PARTITIONING');
|
||||
# if PARTITIONING is unset, or one of [...], use disk_guided_empty,
|
||||
# which is the simplest / 'default' case.
|
||||
if (! $partitioning || $partitioning ~~ ['guided_empty', 'guided_free_space']) {
|
||||
if (!$partitioning || $partitioning ~~ ['guided_empty', 'guided_free_space']) {
|
||||
$storage = "tests/disk_guided_empty.pm";
|
||||
}
|
||||
else {
|
||||
$storage = "tests/disk_".$partitioning.".pm";
|
||||
$storage = "tests/disk_" . $partitioning . ".pm";
|
||||
}
|
||||
autotest::loadtest $storage;
|
||||
|
||||
if (get_var("ENCRYPT_PASSWORD")){
|
||||
if (get_var("ENCRYPT_PASSWORD")) {
|
||||
autotest::loadtest "tests/disk_guided_encrypted.pm";
|
||||
}
|
||||
|
||||
@ -330,7 +330,7 @@ sub load_postinstall_tests() {
|
||||
}
|
||||
autotest::loadtest $storagepost if ($storagepost);
|
||||
|
||||
if (get_var("UEFI") &! get_var("NO_UEFI_POST") &! get_var("START_AFTER_TEST")) {
|
||||
if (get_var("UEFI") & !get_var("NO_UEFI_POST") & !get_var("START_AFTER_TEST")) {
|
||||
autotest::loadtest "tests/uefi_postinstall.pm";
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,35 @@
|
||||
}
|
||||
},
|
||||
"Products": {
|
||||
"rocky-boot-iso-aarch64-*": {
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*": {
|
||||
"arch": "x86_64",
|
||||
"distri": "rocky",
|
||||
"flavor": "GenericCloud_Base-qcow2-qcow2",
|
||||
"settings": {
|
||||
"BOOTFROM": "c",
|
||||
"DEPLOY_UPLOAD_TEST": "",
|
||||
"+HDD_1": "%HDD_2%",
|
||||
"ISO": "cloudinit.iso",
|
||||
"ROOT_PASSWORD": "weakpassword",
|
||||
"TEST_TARGET": "HDD_1"
|
||||
},
|
||||
"version": "*"
|
||||
},
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*": {
|
||||
"arch": "x86_64",
|
||||
"distri": "rocky",
|
||||
"flavor": "GenericCloud_LVM-qcow2-qcow2",
|
||||
"settings": {
|
||||
"BOOTFROM": "c",
|
||||
"DEPLOY_UPLOAD_TEST": "",
|
||||
"+HDD_1": "%HDD_2%",
|
||||
"ISO": "cloudinit.iso",
|
||||
"ROOT_PASSWORD": "weakpassword",
|
||||
"TEST_TARGET": "HDD_1"
|
||||
},
|
||||
"version": "*"
|
||||
},
|
||||
"rocky-boot-iso-aarch64-*": {
|
||||
"arch": "aarch64",
|
||||
"distri": "rocky",
|
||||
"flavor": "boot-iso",
|
||||
@ -166,7 +194,23 @@
|
||||
}
|
||||
},
|
||||
"Profiles": {
|
||||
"rocky-boot-iso-aarch64-*-aarch64": {
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-64bit": {
|
||||
"machine": "64bit",
|
||||
"product": "rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*"
|
||||
},
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-64bit": {
|
||||
"machine": "64bit",
|
||||
"product": "rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*"
|
||||
},
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-uefi": {
|
||||
"machine": "uefi",
|
||||
"product": "rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*"
|
||||
},
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-uefi": {
|
||||
"machine": "uefi",
|
||||
"product": "rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*"
|
||||
},
|
||||
"rocky-boot-iso-aarch64-*-aarch64": {
|
||||
"machine": "aarch64",
|
||||
"product": "rocky-boot-iso-aarch64-*"
|
||||
},
|
||||
@ -236,6 +280,10 @@
|
||||
},
|
||||
"base_reboot_unmount": {
|
||||
"profiles": {
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-dvd-iso-aarch64-*-aarch64": 20,
|
||||
"rocky-dvd-iso-x86_64-*-64bit": 20
|
||||
},
|
||||
@ -251,6 +299,10 @@
|
||||
},
|
||||
"base_system_logging": {
|
||||
"profiles": {
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-dvd-iso-aarch64-*-aarch64": 20,
|
||||
"rocky-dvd-iso-x86_64-*-64bit": 20
|
||||
},
|
||||
@ -266,6 +318,10 @@
|
||||
},
|
||||
"base_update_cli": {
|
||||
"profiles": {
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-dvd-iso-aarch64-*-aarch64": 20,
|
||||
"rocky-dvd-iso-x86_64-*-64bit": 20
|
||||
},
|
||||
@ -281,6 +337,10 @@
|
||||
},
|
||||
"base_package_install_remove": {
|
||||
"profiles": {
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-dvd-iso-aarch64-*-aarch64": 40,
|
||||
"rocky-dvd-iso-x86_64-*-64bit": 40
|
||||
},
|
||||
@ -296,6 +356,10 @@
|
||||
},
|
||||
"base_services_start": {
|
||||
"profiles": {
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-dvd-iso-aarch64-*-aarch64": 40,
|
||||
"rocky-dvd-iso-x86_64-*-64bit": 40
|
||||
},
|
||||
@ -311,6 +375,10 @@
|
||||
},
|
||||
"base_selinux": {
|
||||
"profiles": {
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-dvd-iso-aarch64-*-aarch64": 40,
|
||||
"rocky-dvd-iso-x86_64-*-64bit": 40
|
||||
},
|
||||
@ -326,6 +394,10 @@
|
||||
},
|
||||
"base_service_manipulation": {
|
||||
"profiles": {
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-dvd-iso-aarch64-*-aarch64": 40,
|
||||
"rocky-dvd-iso-x86_64-*-64bit": 40
|
||||
},
|
||||
@ -339,7 +411,18 @@
|
||||
"USER_LOGIN": "false"
|
||||
}
|
||||
},
|
||||
"install_resize_lvm": {
|
||||
"cloud_autocloud": {
|
||||
"profiles": {
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_Base-qcow2-qcow2-x86_64-*-uefi": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-64bit": 30,
|
||||
"rocky-GenericCloud_LVM-qcow2-qcow2-x86_64-*-uefi": 30
|
||||
},
|
||||
"settings": {
|
||||
"POSTINSTALL": "autocloud"
|
||||
}
|
||||
},
|
||||
"install_resize_lvm": {
|
||||
"profiles": {
|
||||
"rocky-dvd-iso-aarch64-*-aarch64": 40,
|
||||
"rocky-dvd-iso-x86_64-*-64bit": 40
|
||||
|
@ -5,7 +5,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
$self->root_console(tty=>3);
|
||||
$self->root_console(tty => 3);
|
||||
# figure out which packages from the update actually got installed
|
||||
# (if any) as part of this test
|
||||
advisory_get_installed_packages;
|
||||
@ -15,7 +15,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -7,7 +7,7 @@ sub run {
|
||||
my $self = shift;
|
||||
# do the 'repo setup' steps, which set up a repo containing the
|
||||
# update packages and run 'dnf update'
|
||||
$self->root_console(tty=>3);
|
||||
$self->root_console(tty => 3);
|
||||
repo_setup;
|
||||
if (get_var("ADVISORY_BOOT_TEST")) {
|
||||
# to test boot stuff - in case the update touched grub2, or dracut,
|
||||
@ -25,7 +25,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -7,7 +7,7 @@ use tapnet;
|
||||
sub run {
|
||||
my $self = shift;
|
||||
# Anaconda hub
|
||||
assert_screen "anaconda_main_hub", 300; #
|
||||
assert_screen "anaconda_main_hub", 300; #
|
||||
|
||||
assert_and_click "anaconda_main_hub_kdump";
|
||||
assert_and_click "anaconda_kdump_disable";
|
||||
@ -16,7 +16,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -7,7 +7,7 @@ use tapnet;
|
||||
sub run {
|
||||
my $self = shift;
|
||||
# Anaconda hub
|
||||
assert_screen "anaconda_main_hub", 300; #
|
||||
assert_screen "anaconda_main_hub", 300; #
|
||||
|
||||
assert_and_click "anaconda_main_hub_kdump";
|
||||
assert_and_click "anaconda_kdump_enable";
|
||||
@ -16,7 +16,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -7,7 +7,7 @@ use tapnet;
|
||||
sub run {
|
||||
my $self = shift;
|
||||
# Anaconda hub
|
||||
assert_screen "anaconda_main_hub", 300; #
|
||||
assert_screen "anaconda_main_hub", 300; #
|
||||
|
||||
if (check_screen ["anaconda_network_connected"], 60) {
|
||||
# network is connected already, we're done
|
||||
@ -22,7 +22,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -30,7 +30,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -77,7 +77,7 @@ sub run {
|
||||
# call do_bootloader with postinstall=0, the params, and the mutex,
|
||||
# unless we're a VNC install client (no bootloader there)
|
||||
unless (get_var("VNC_CLIENT")) {
|
||||
do_bootloader(postinstall=>0, params=>$params, mutex=>$mutex, timeout=>$timeout);
|
||||
do_bootloader(postinstall => 0, params => $params, mutex => $mutex, timeout => $timeout);
|
||||
}
|
||||
|
||||
# Read variables for identification tests (see further).
|
||||
@ -99,7 +99,7 @@ sub run {
|
||||
# we direct the installer to virtio-console1, and use
|
||||
# virtio-console as a root console
|
||||
select_console('virtio-console1');
|
||||
unless (wait_serial "Use text mode", timeout=>120) { die "Anaconda has not started."; }
|
||||
unless (wait_serial "Use text mode", timeout => 120) { die "Anaconda has not started."; }
|
||||
type_string "2\n";
|
||||
unless (wait_serial "Installation") { die "Text version of Anaconda has not started."; }
|
||||
}
|
||||
@ -130,17 +130,17 @@ sub run {
|
||||
my $relnum = get_release_number;
|
||||
my $dclick = 0;
|
||||
$dclick = 1 if (get_var("DESKTOP") eq "kde" && $relnum > 33);
|
||||
assert_and_click("live_start_anaconda_icon", dclick=>$dclick);
|
||||
assert_and_click("live_start_anaconda_icon", dclick => $dclick);
|
||||
unless (check_screen "anaconda_select_install_lang", 180) {
|
||||
# click it again - on KDE since 2019-10 or so it seems
|
||||
# like the first attempt sometimes just doesn't work
|
||||
assert_and_click("live_start_anaconda_icon", dclick=>$dclick, timeout=>300);
|
||||
assert_and_click("live_start_anaconda_icon", dclick => $dclick, timeout => 300);
|
||||
}
|
||||
}
|
||||
my $language = get_var('LANGUAGE') || 'english';
|
||||
# wait for anaconda to appear; we click to work around
|
||||
# RHBZ #1566066 if it happens
|
||||
assert_and_click("anaconda_select_install_lang", timeout=>300);
|
||||
assert_and_click("anaconda_select_install_lang", timeout => 300);
|
||||
|
||||
# Select install language
|
||||
wait_screen_change { assert_and_click "anaconda_select_install_lang_input"; };
|
||||
@ -177,7 +177,7 @@ sub run {
|
||||
# Here, we will watch for the graphical elements in Anaconda main hub.
|
||||
my $branched = get_var('VERSION');
|
||||
if ($identification eq 'true' or $branched ne "Rawhide") {
|
||||
check_left_bar(); # See utils.pm
|
||||
check_left_bar(); # See utils.pm
|
||||
check_prerelease();
|
||||
check_version();
|
||||
}
|
||||
@ -185,13 +185,13 @@ sub run {
|
||||
# didn't match anything: if the Rawhide warning didn't
|
||||
# show by now it never will, so we'll just wait for the
|
||||
# hub to show up.
|
||||
assert_screen "anaconda_main_hub", 900; #
|
||||
assert_screen "anaconda_main_hub", 900; #
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -81,16 +81,16 @@ sub run {
|
||||
}
|
||||
# just for convenience - sometimes it's useful to see this log
|
||||
# for a success case
|
||||
upload_logs "/tmp/packaging.log", failok=>1;
|
||||
upload_logs "/tmp/packaging.log", failok => 1;
|
||||
send_key "ctrl-alt-f6";
|
||||
|
||||
# Anaconda hub
|
||||
assert_screen "anaconda_main_hub", 30; #
|
||||
assert_screen "anaconda_main_hub", 30; #
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -4,7 +4,7 @@ use testapi;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
$self->root_console(tty=>4);
|
||||
$self->root_console(tty => 4);
|
||||
assert_script_run 'top -i -n20 -b > /var/tmp/top.log', 120;
|
||||
upload_logs '/var/tmp/top.log';
|
||||
unless (get_var("CANNED")) {
|
||||
@ -43,7 +43,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { 'ignore_failure' => 1 };
|
||||
return {'ignore_failure' => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -5,7 +5,7 @@ use testapi;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
$self->root_console(tty=>3);
|
||||
$self->root_console(tty => 3);
|
||||
# if this is a non-English, non-switched layout, load US layout
|
||||
# at this point
|
||||
# FIXME: this is all kind of a mess, as on such configs we need
|
||||
|
@ -11,14 +11,14 @@ sub run {
|
||||
# with a password that requires Arabic support.
|
||||
# Such attempt to log in would always fail.
|
||||
if (get_var("LANGUAGE") ne "arabic" && get_var("USER_LOGIN") ne "false") {
|
||||
console_login(user=>get_var("USER_LOGIN", "test"), password=>get_var("USER_PASSWORD", "weakpassword"));
|
||||
console_login(user => get_var("USER_LOGIN", "test"), password => get_var("USER_PASSWORD", "weakpassword"));
|
||||
}
|
||||
if (get_var("ROOT_PASSWORD")) {
|
||||
console_login(user=>"root", password=>get_var("ROOT_PASSWORD"));
|
||||
console_login(user => "root", password => get_var("ROOT_PASSWORD"));
|
||||
}
|
||||
}
|
||||
sub test_flags {
|
||||
return { fatal => 1, milestone => 1 };
|
||||
return {fatal => 1, milestone => 1};
|
||||
}
|
||||
1;
|
||||
# vim: set sw=4 et:
|
||||
|
@ -10,7 +10,7 @@ sub run {
|
||||
# use the desktops' graphical shutdown methods, we just go to a
|
||||
# console and run 'poweroff'. We can write separate tests for
|
||||
# properly testing shutdown/reboot/log out from desktops.
|
||||
$self->root_console(tty=>4);
|
||||
$self->root_console(tty => 4);
|
||||
# disable the hidden grub menu on Workstation, so post-install
|
||||
# tests that need to edit boot params will see it. Don't use
|
||||
# assert_script_run as this will fail when it's not set
|
||||
@ -23,7 +23,7 @@ sub run {
|
||||
# even if shutdown fails. we should have a separate test for shutdown/
|
||||
# logout/reboot stuff, might need some refactoring.
|
||||
sub test_flags {
|
||||
return { 'norollback' => 1, 'ignore_failure' => 1 };
|
||||
return {'norollback' => 1, 'ignore_failure' => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -11,7 +11,7 @@ sub run {
|
||||
|
||||
# handle bootloader, if requested
|
||||
if (get_var("GRUB_POSTINSTALL")) {
|
||||
do_bootloader(postinstall=>1, params=>get_var("GRUB_POSTINSTALL"), timeout=>$wait_time);
|
||||
do_bootloader(postinstall => 1, params => get_var("GRUB_POSTINSTALL"), timeout => $wait_time);
|
||||
$wait_time = 240;
|
||||
}
|
||||
|
||||
@ -24,23 +24,23 @@ sub run {
|
||||
boot_to_login_screen(timeout => $wait_time);
|
||||
|
||||
# switch to TTY3 for both, graphical and console tests
|
||||
$self->root_console(tty=>3);
|
||||
$self->root_console(tty => 3);
|
||||
|
||||
# do user login unless USER_LOGIN is set to string 'false'
|
||||
unless (get_var("USER_LOGIN") eq "false") {
|
||||
# this avoids us waiting 90 seconds for a # to show up
|
||||
my $origprompt = $testapi::distri->{serial_term_prompt};
|
||||
$testapi::distri->{serial_term_prompt} = '$ ';
|
||||
console_login(user=>get_var("USER_LOGIN", "test"), password=>get_var("USER_PASSWORD", "weakpassword"));
|
||||
console_login(user => get_var("USER_LOGIN", "test"), password => get_var("USER_PASSWORD", "weakpassword"));
|
||||
$testapi::distri->{serial_term_prompt} = $origprompt;
|
||||
}
|
||||
if (get_var("ROOT_PASSWORD")) {
|
||||
console_login(user=>"root", password=>get_var("ROOT_PASSWORD"));
|
||||
console_login(user => "root", password => get_var("ROOT_PASSWORD"));
|
||||
}
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1, milestone => 1 };
|
||||
return {fatal => 1, milestone => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -12,7 +12,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -137,14 +137,14 @@ sub run {
|
||||
# there are various things we might have to do at a console here
|
||||
# before we actually reboot. let's figure them all out first...
|
||||
my @actions;
|
||||
push (@actions, 'consoletty0') if (get_var("ARCH") eq "aarch64");
|
||||
push (@actions, 'abrt') if (get_var("ABRT", '') eq "system");
|
||||
push (@actions, 'rootpw') if (get_var("INSTALLER_NO_ROOT"));
|
||||
push (@actions, 'stagingrepos') if (get_var("DNF_CONTENTDIR"));
|
||||
push(@actions, 'consoletty0') if (get_var("ARCH") eq "aarch64");
|
||||
push(@actions, 'abrt') if (get_var("ABRT", '') eq "system");
|
||||
push(@actions, 'rootpw') if (get_var("INSTALLER_NO_ROOT"));
|
||||
push(@actions, 'stagingrepos') if (get_var("DNF_CONTENTDIR"));
|
||||
# memcheck test doesn't need to reboot at all. Rebooting from GUI
|
||||
# for lives is unreliable. And if we're already doing something
|
||||
# else at a console, we may as well reboot from there too
|
||||
push (@actions, 'reboot') if (!get_var("MEMCHECK") && (get_var("LIVE") || @actions));
|
||||
push(@actions, 'reboot') if (!get_var("MEMCHECK") && (get_var("LIVE") || @actions));
|
||||
# our approach for taking all these actions doesn't work on VNC
|
||||
# installs, fortunately we don't need any of them in that case
|
||||
# yet, so for now let's just flush the list here if we're VNC
|
||||
@ -159,14 +159,14 @@ sub run {
|
||||
}
|
||||
# OK, if we're here, we got actions, so head to a console. Switch
|
||||
# to console after liveinst sometimes takes a while, so 30 secs
|
||||
$self->root_console(timeout=>30);
|
||||
$self->root_console(timeout => 30);
|
||||
# this is something a couple of actions may need to know
|
||||
my $mount = "/mnt/sysimage";
|
||||
if (get_var("CANNED")) {
|
||||
# finding the actual host system root is fun for ostree...
|
||||
$mount = "/mnt/sysimage/ostree/deploy/fedora*/deploy/*.?";
|
||||
}
|
||||
if (grep {$_ eq 'consoletty0'} @actions) {
|
||||
if (grep { $_ eq 'consoletty0' } @actions) {
|
||||
# somehow, by this point, localized keyboard layout has been
|
||||
# loaded for this tty, so for French and Arabic at least we
|
||||
# need to load the 'us' layout again for the next command to
|
||||
@ -180,15 +180,15 @@ sub run {
|
||||
# regenerate the bootloader config
|
||||
assert_script_run "chroot $mount grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg";
|
||||
}
|
||||
if (grep {$_ eq 'abrt'} @actions) {
|
||||
# Chroot in the newly installed system and switch on ABRT systemwide
|
||||
assert_script_run "chroot $mount abrt-auto-reporting 1";
|
||||
if (grep { $_ eq 'abrt' } @actions) {
|
||||
# Chroot in the newly installed system and switch on ABRT systemwide
|
||||
assert_script_run "chroot $mount abrt-auto-reporting 1";
|
||||
}
|
||||
if (grep {$_ eq 'rootpw'} @actions) {
|
||||
if (grep { $_ eq 'rootpw' } @actions) {
|
||||
my $root_password = get_var("ROOT_PASSWORD") || "weakpassword";
|
||||
assert_script_run "echo 'root:$root_password' | chpasswd -R $mount";
|
||||
}
|
||||
if (grep {$_ eq 'stagingrepos'} @actions) {
|
||||
if (grep { $_ eq 'stagingrepos' } @actions) {
|
||||
if (get_version_major() < 9) {
|
||||
assert_script_run 'sed -i -e "s/^mirrorlist/#mirrorlist/g;s,^#\(baseurl=http[s]*://\),\1,g" ' . $mount . '/etc/yum.repos.d/Rocky-BaseOS.repo';
|
||||
assert_script_run 'sed -i -e "s/^mirrorlist/#mirrorlist/g;s,^#\(baseurl=http[s]*://\),\1,g" ' . $mount . '/etc/yum.repos.d/Rocky-AppStream.repo';
|
||||
@ -202,11 +202,11 @@ sub run {
|
||||
}
|
||||
assert_script_run 'printf "stg/rocky\n" > ' . $mount . '/etc/dnf/vars/contentdir';
|
||||
}
|
||||
type_string "reboot\n" if (grep {$_ eq 'reboot'} @actions);
|
||||
type_string "reboot\n" if (grep { $_ eq 'reboot' } @actions);
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -50,7 +50,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -17,17 +17,17 @@ sub run {
|
||||
|
||||
# handle bootloader, if requested
|
||||
if (get_var("GRUB_POSTINSTALL")) {
|
||||
do_bootloader(postinstall=>1, params=>get_var("GRUB_POSTINSTALL"), timeout=>$wait_time);
|
||||
do_bootloader(postinstall => 1, params => get_var("GRUB_POSTINSTALL"), timeout => $wait_time);
|
||||
$wait_time = 300;
|
||||
}
|
||||
|
||||
# Handle pre-login initial setup if we're doing INSTALL_NO_USER
|
||||
if (get_var("INSTALL_NO_USER") && !get_var("_SETUP_DONE")) {
|
||||
if (get_var("DESKTOP") eq 'gnome') {
|
||||
gnome_initial_setup(prelogin=>1, timeout=>$wait_time);
|
||||
gnome_initial_setup(prelogin => 1, timeout => $wait_time);
|
||||
}
|
||||
else {
|
||||
anaconda_create_user(timeout=>$wait_time);
|
||||
anaconda_create_user(timeout => $wait_time);
|
||||
# wait out animation
|
||||
wait_still_screen 3;
|
||||
assert_and_click "initialsetup_finish_configuration";
|
||||
@ -41,7 +41,7 @@ sub run {
|
||||
unless (get_var("DESKTOP") eq 'gnome' && get_var("INSTALL_NO_USER")) {
|
||||
unless (get_var("HDD_1") && !(get_var("PARTITIONING") eq "custom_resize_lvm")) {
|
||||
# in 9.0, license screens are not shown by default
|
||||
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/9.0_release_notes/index#enhancement_installer-and-image-creation
|
||||
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/9.0_release_notes/index#enhancement_installer-and-image-creation
|
||||
unless (get_version_major() > 8) {
|
||||
# for Rocky Linux here happens to be a license acceptance screen
|
||||
# the initial appearance can sometimes take really long
|
||||
@ -125,7 +125,7 @@ sub run {
|
||||
# root user now, for subsequent tests to work
|
||||
if (get_var("IMAGE_DEPLOY")) {
|
||||
send_key "ctrl-alt-f3";
|
||||
console_login(user=>get_var("USER_LOGIN", "test"), password=>get_var("USER_PASSWORD", "weakpassword"));
|
||||
console_login(user => get_var("USER_LOGIN", "test"), password => get_var("USER_PASSWORD", "weakpassword"));
|
||||
type_string "sudo su\n";
|
||||
type_string "$password\n";
|
||||
my $root_password = get_var("ROOT_PASSWORD") || "weakpassword";
|
||||
@ -137,11 +137,11 @@ sub run {
|
||||
# Move the mouse somewhere it won't highlight the match areas
|
||||
mouse_set(300, 800);
|
||||
# KDE can take ages to start up
|
||||
check_desktop(timeout=>120);
|
||||
check_desktop(timeout => 120);
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1, milestone => 1 };
|
||||
return {fatal => 1, milestone => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -24,13 +24,13 @@ sub run {
|
||||
$cmd .= " --repo=/etc/yum.repos.d/advisory.repo --repo=/etc/yum.repos.d/workarounds.repo ./results";
|
||||
assert_script_run $cmd, 1500;
|
||||
# good to have the log around for checks
|
||||
upload_logs "pylorax.log", failok=>1;
|
||||
upload_logs "pylorax.log", failok => 1;
|
||||
assert_script_run "mv results/images/boot.iso ./${advortask}-netinst-${arch}.iso";
|
||||
upload_asset "./${advortask}-netinst-x86_64.iso";
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -56,7 +56,7 @@ sub run {
|
||||
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -39,7 +39,7 @@ sub run {
|
||||
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -66,7 +66,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -1,17 +1,17 @@
|
||||
use base "anacondatest";
|
||||
use strict;
|
||||
use testapi;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
$self->root_console();
|
||||
upload_logs '/tmp/memory.dat';
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
||||
use strict;
|
||||
use testapi;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
$self->root_console();
|
||||
upload_logs '/tmp/memory.dat';
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
||||
|
@ -8,7 +8,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
$self->root_console(tty=>3);
|
||||
$self->root_console(tty => 3);
|
||||
# wait for server to be set up
|
||||
mutex_lock "podman_server_ready";
|
||||
mutex_unlock "podman_server_ready";
|
||||
@ -23,7 +23,7 @@ sub run {
|
||||
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -13,7 +13,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -6,7 +6,7 @@ use utils;
|
||||
sub run {
|
||||
my $self = shift;
|
||||
# switch to TTY3 for both, graphical and console tests
|
||||
$self->root_console(tty=>3);
|
||||
$self->root_console(tty => 3);
|
||||
|
||||
# set up appropriate repositories
|
||||
repo_setup();
|
||||
@ -27,7 +27,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1, milestone => 1 };
|
||||
return {fatal => 1, milestone => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -5,7 +5,7 @@ use testapi;
|
||||
sub run {
|
||||
my $self = shift;
|
||||
# Anaconda hub
|
||||
assert_screen "anaconda_main_hub", 300; #
|
||||
assert_screen "anaconda_main_hub", 300; #
|
||||
|
||||
# Select package set.
|
||||
# If 'default' is specified, skip selection, but verify correct default
|
||||
@ -33,22 +33,22 @@ sub run {
|
||||
|
||||
# In Rocky, graphical-server starts out selected in the DVD ISO so if that's
|
||||
# what we're looking for we're done
|
||||
if (!check_screen("anaconda_".$packageset."_selected", 1)) {
|
||||
send_key_until_needlematch("anaconda_".$packageset."_highlighted", "down", 20);
|
||||
send_key "spc";
|
||||
if (!check_screen("anaconda_" . $packageset . "_selected", 1)) {
|
||||
send_key_until_needlematch("anaconda_" . $packageset . "_highlighted", "down", 20);
|
||||
send_key "spc";
|
||||
}
|
||||
|
||||
# check that desired environment is selected
|
||||
assert_screen "anaconda_".$packageset."_selected";
|
||||
assert_screen "anaconda_" . $packageset . "_selected";
|
||||
assert_and_click "anaconda_spoke_done";
|
||||
|
||||
# Anaconda hub
|
||||
assert_screen "anaconda_main_hub", 50; #
|
||||
assert_screen "anaconda_main_hub", 50; #
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -5,17 +5,17 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
$self->root_console(tty=>4);
|
||||
$self->root_console(tty => 4);
|
||||
# Point at default repositories by modifying contentdir
|
||||
# NOTE: This will leave repos pointing at primary dl server instead
|
||||
# of mirrorlist.
|
||||
script_run 'printf "pub/rocky\n" > /etc/dnf/vars/contentdir';
|
||||
script_run 'dnf clean all';
|
||||
script_run 'dnf repoinfo'
|
||||
script_run 'dnf repoinfo';
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -5,14 +5,14 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
$self->root_console(tty=>4);
|
||||
$self->root_console(tty => 4);
|
||||
# Point at staging repositories by modifying contentdir
|
||||
if (get_version_major() < 9) {
|
||||
script_run "sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/Rocky-*";
|
||||
script_run "sed -i 's,^#\(baseurl=http[s]*://\),\1,g' /etc/yum.repos.d/Rocky-*";
|
||||
} else {
|
||||
script_run "sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/rocky*";
|
||||
script_run "sed -i 's,^#\(baseurl=http[s]*://\),\1,g' /etc/yum.repos.d/rocky*";
|
||||
script_run "sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/rocky*";
|
||||
script_run "sed -i 's,^#\(baseurl=http[s]*://\),\1,g' /etc/yum.repos.d/rocky*";
|
||||
}
|
||||
script_run 'printf "stg/rocky\n" > /etc/dnf/vars/contentdir';
|
||||
script_run 'dnf clean all';
|
||||
@ -20,7 +20,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -89,7 +89,7 @@ file:///ks.cfg\n initrdefi rocky/initrd.img\n}' >> /var/lib/tftpboot/grub.cfg";
|
||||
# download kernel and initramfs
|
||||
my $location = get_var("LOCATION");
|
||||
my $kernpath = "images/pxeboot";
|
||||
# for some crazy reason these are in a different place for ppc64
|
||||
# for some crazy reason these are in a different place for ppc64
|
||||
$kernpath = "ppc/ppc64" if ($arch eq 'ppc64le');
|
||||
assert_script_run "curl -o /var/lib/tftpboot/rocky/vmlinuz $location/BaseOS/${arch}/os/${kernpath}/vmlinuz";
|
||||
assert_script_run "curl -o /var/lib/tftpboot/rocky/initrd.img $location/BaseOS/${arch}/os/${kernpath}/initrd.img";
|
||||
@ -108,7 +108,7 @@ file:///ks.cfg\n initrdefi rocky/initrd.img\n}' >> /var/lib/tftpboot/grub.cfg";
|
||||
}
|
||||
|
||||
sub run {
|
||||
my $self=shift;
|
||||
my $self = shift;
|
||||
# disable systemd-resolved, it conflicts with dnsmasq
|
||||
unless (script_run "systemctl is-active systemd-resolved.service") {
|
||||
script_run "systemctl stop systemd-resolved.service";
|
||||
@ -131,7 +131,7 @@ sub run {
|
||||
## ISCSI
|
||||
|
||||
# start up iscsi target
|
||||
#assert_script_run "printf '<target iqn.2016-06.local.domain:support.target1>\n backing-store /dev/vdb\n incominguser test weakpassword\n</target>' > /etc/tgt/conf.d/openqa.conf";
|
||||
#assert_script_run "printf '<target iqn.2016-06.local.domain:support.target1>\n backing-store /dev/vdb\n incominguser test weakpassword\n</target>' > /etc/tgt/conf.d/openqa.conf";
|
||||
assert_script_run "targetcli /backstores/block create dev=/dev/vdb name=vdb";
|
||||
assert_script_run "targetcli /iscsi create wwn=iqn.2016-06.local.domain:support.target1";
|
||||
assert_script_run "targetcli /iscsi/iqn.2016-06.local.domain:support.target1/tpg1/acls create iqn.2016-06.local.domain:support.target1";
|
||||
@ -190,7 +190,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -20,7 +20,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
sub run {
|
||||
my $self = shift;
|
||||
boot_to_login_screen(timeout => 300);
|
||||
$self->root_console(tty=>3);
|
||||
$self->root_console(tty => 3);
|
||||
setup_tap_static('172.16.2.115', 'vnc002.test.openqa.fedoraproject.org');
|
||||
# test test: check if we can see the server
|
||||
assert_script_run "ping -c 2 172.16.2.114";
|
||||
@ -18,7 +18,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -13,7 +13,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
sub run {
|
||||
my $self = shift;
|
||||
boot_to_login_screen(timeout => 300);
|
||||
$self->root_console(tty=>3);
|
||||
$self->root_console(tty => 3);
|
||||
setup_tap_static('172.16.2.117', 'vnc004.test.openqa.fedoraproject.org');
|
||||
# install tigervnc (Boxes doesn't do reverse VNC)
|
||||
assert_script_run "dnf -y install tigervnc", 180;
|
||||
@ -17,7 +17,7 @@ sub run {
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return { fatal => 1 };
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -56,11 +56,11 @@ sub run {
|
||||
# on GNOME installs (Workstation Live and Silverblue) we don't
|
||||
# need to set a root password or create a user; on other flavors
|
||||
# we must
|
||||
unless (get_var("DESKTOP") eq "gnome" ) {
|
||||
unless (get_var("DESKTOP") eq "gnome") {
|
||||
# In Rocky ISO you will finish testplan on Create User and need to shift-tab to select
|
||||
# Root password
|
||||
if ((get_var("DISTRI") eq "rocky" )) {
|
||||
send_key_until_needlematch("anaconda_main_hub_root_password", "shift-tab");
|
||||
# Root password
|
||||
if ((get_var("DISTRI") eq "rocky")) {
|
||||
send_key_until_needlematch("anaconda_main_hub_root_password", "shift-tab");
|
||||
}
|
||||
assert_and_click "anaconda_main_hub_root_password";
|
||||
type_safely "weakrootpassword";
|
||||
|
@ -25,13 +25,13 @@ sub download_testdata {
|
||||
# Change ownership and attributes
|
||||
assert_script_run("chown -R test:test openqa_testdata");
|
||||
# Move the test file into a correct location.
|
||||
assert_script_run("cp openqa_testdata/evince/evince.pdf Documents")
|
||||
assert_script_run("cp openqa_testdata/evince/evince.pdf Documents");
|
||||
}
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
# Switch to console
|
||||
$self->root_console(tty=>3);
|
||||
$self->root_console(tty => 3);
|
||||
# Perform git test
|
||||
check_and_install_git();
|
||||
# Download the test data
|
||||
@ -55,7 +55,7 @@ sub run {
|
||||
|
||||
# Select the evince.pdf file.
|
||||
assert_and_click("evince_file_select_pdf", button => "left", timeout => 30);
|
||||
|
||||
|
||||
# Click the Open button to open the file
|
||||
assert_and_click("gnome_button_open", button => "left", timeout => 30);
|
||||
|
||||
|
@ -6,23 +6,23 @@ use utils;
|
||||
# This part of the suite tests if About works.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
|
||||
# Open the menu by clicking on the Burger icon
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
# Open the menu by clicking on the Burger icon
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
|
||||
# In the menu, select the About item.
|
||||
assert_and_click("evince_menu_about", button => "left", timeout => 30);
|
||||
# In the menu, select the About item.
|
||||
assert_and_click("evince_menu_about", button => "left", timeout => 30);
|
||||
|
||||
# Check that the About section has been displayed.
|
||||
assert_screen("evince_about_shown");
|
||||
# Check that the About section has been displayed.
|
||||
assert_screen("evince_about_shown");
|
||||
|
||||
# Click on Credits button to see the second part of the dialogue.
|
||||
assert_and_click("evince_about_credits", button => "left", timeout => 30);
|
||||
# Click on Credits button to see the second part of the dialogue.
|
||||
assert_and_click("evince_about_credits", button => "left", timeout => 30);
|
||||
|
||||
# Check that Credits are accessible and visible, too.
|
||||
assert_screen("evince_credits_shown");
|
||||
# Check that Credits are accessible and visible, too.
|
||||
assert_screen("evince_credits_shown");
|
||||
|
||||
}
|
||||
|
||||
|
@ -6,37 +6,37 @@ use utils;
|
||||
# This part of the suite tests an annotation can be added to the displayed content.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
|
||||
# Click on the Pencil button.
|
||||
assert_and_click("evince_add_annotation", button => "left", timeout => 30);
|
||||
# Click on the Pencil button.
|
||||
assert_and_click("evince_add_annotation", button => "left", timeout => 30);
|
||||
|
||||
# Click on Note text.
|
||||
assert_and_click("evince_add_annotation_text", button => "left", timeout => 30);
|
||||
# Click on Note text.
|
||||
assert_and_click("evince_add_annotation_text", button => "left", timeout => 30);
|
||||
|
||||
# Select location to add annotation.
|
||||
assert_and_click("evince_select_annotation_place", button => "left", timeout => 30);
|
||||
# Select location to add annotation.
|
||||
assert_and_click("evince_select_annotation_place", button => "left", timeout => 30);
|
||||
|
||||
# Enter some text to the annotation.
|
||||
type_very_safely("Add note");
|
||||
# Enter some text to the annotation.
|
||||
type_very_safely("Add note");
|
||||
|
||||
# Check that the annotation window has appeared with that text.
|
||||
assert_screen("evince_annotation_added");
|
||||
# Check that the annotation window has appeared with that text.
|
||||
assert_screen("evince_annotation_added");
|
||||
|
||||
# Close the annotation.
|
||||
assert_and_click("evince_close_annotation", button => "left", timeout => 30);
|
||||
# Close the annotation.
|
||||
assert_and_click("evince_close_annotation", button => "left", timeout => 30);
|
||||
|
||||
# Check that the annotation is still placed in the document.
|
||||
assert_screen("evince_annotation_placed");
|
||||
# Check that the annotation is still placed in the document.
|
||||
assert_screen("evince_annotation_placed");
|
||||
|
||||
# Open the annotation's context menu.
|
||||
assert_and_click("evince_annotation_placed", button => "right", timeout => 30);
|
||||
# Open the annotation's context menu.
|
||||
assert_and_click("evince_annotation_placed", button => "right", timeout => 30);
|
||||
|
||||
# Remove the annotation.
|
||||
assert_and_click("evince_remove_annotation", button => "left", timeout => 30);
|
||||
# Remove the annotation.
|
||||
assert_and_click("evince_remove_annotation", button => "left", timeout => 30);
|
||||
|
||||
# Check that the annotation has been removed.
|
||||
assert_screen("evince_annotation_removed");
|
||||
# Check that the annotation has been removed.
|
||||
assert_screen("evince_annotation_removed");
|
||||
|
||||
}
|
||||
|
||||
|
@ -6,22 +6,22 @@ use utils;
|
||||
# This part of the suite tests that Evince can change the zoom of the document.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Click on zoom menu to open choices.
|
||||
assert_and_click("evince_change_zoom", button => "left", timeout => 30);
|
||||
# Click on zoom menu to open choices.
|
||||
assert_and_click("evince_change_zoom", button => "left", timeout => 30);
|
||||
|
||||
# Select 200%.
|
||||
assert_and_click("evince_select_zoom_200", button => "left", timeout => 30);
|
||||
# Select 200%.
|
||||
assert_and_click("evince_select_zoom_200", button => "left", timeout => 30);
|
||||
|
||||
# Check that the document zoom was changed.
|
||||
assert_screen("evince_document_zoom_200");
|
||||
# Check that the document zoom was changed.
|
||||
assert_screen("evince_document_zoom_200");
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {always_rollback => 1};
|
||||
return {always_rollback => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -6,32 +6,32 @@ use utils;
|
||||
# This part of the suite tests that Evince is able to display content in a two-page mode.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
|
||||
# Click on the Zoom menu to change a different zoom for next steps.
|
||||
assert_and_click("evince_change_zoom", button => "left", timeout => 30);
|
||||
# Click on the Zoom menu to change a different zoom for next steps.
|
||||
assert_and_click("evince_change_zoom", button => "left", timeout => 30);
|
||||
|
||||
# Select the Fit Width option to be able to see the whole layout.
|
||||
assert_and_click("evince_select_zoom_fitwidth", button => "left", timeout => 30);
|
||||
# Select the Fit Width option to be able to see the whole layout.
|
||||
assert_and_click("evince_select_zoom_fitwidth", button => "left", timeout => 30);
|
||||
|
||||
#Dismiss the dialogue
|
||||
send_key("esc");
|
||||
#Dismiss the dialogue
|
||||
send_key("esc");
|
||||
|
||||
# Enter the menu
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
# Enter the menu
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
|
||||
# Select the Dual mode
|
||||
assert_and_click("evince_menu_dual", button => "left", timeout => 30);
|
||||
# Select the Dual mode
|
||||
assert_and_click("evince_menu_dual", button => "left", timeout => 30);
|
||||
|
||||
# Dismiss the menu
|
||||
send_key("esc");
|
||||
# Dismiss the menu
|
||||
send_key("esc");
|
||||
|
||||
# Check that the content is displayed in dual mode.
|
||||
assert_screen("evince_dual_mode", timeout => 30);
|
||||
# Check that the content is displayed in dual mode.
|
||||
assert_screen("evince_dual_mode", timeout => 30);
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {always_rollback => 1};
|
||||
return {always_rollback => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -6,22 +6,22 @@ use utils;
|
||||
# This part of the suite tests that Evince can display the Help pages.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
|
||||
# Open menu with Burger icon.
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
# Open menu with Burger icon.
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
|
||||
# Select the Help item in the menu.
|
||||
assert_and_click("evince_menu_help", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
# Select the Help item in the menu.
|
||||
assert_and_click("evince_menu_help", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
|
||||
# Check that Help has been shown.
|
||||
assert_screen("evince_help_shown", timeout => 30);
|
||||
# Check that Help has been shown.
|
||||
assert_screen("evince_help_shown", timeout => 30);
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {always_rollback => 1};
|
||||
return {always_rollback => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -6,25 +6,25 @@ use utils;
|
||||
# This part of the suite tests that Evince can be switched into night mode.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
|
||||
# Click on the Menu button.
|
||||
assert_and_click("gnome_burger_menu", timeout => 30, button => "left");
|
||||
# Click on the Menu button.
|
||||
assert_and_click("gnome_burger_menu", timeout => 30, button => "left");
|
||||
|
||||
# Click on the Night mode to select it.
|
||||
assert_and_click("evince_toggle_night_mode", button => "left", timeout => 30);
|
||||
# Click on the Night mode to select it.
|
||||
assert_and_click("evince_toggle_night_mode", button => "left", timeout => 30);
|
||||
|
||||
# The menu stays opened, so hit Esc to dismiss it.
|
||||
send_key("esc");
|
||||
wait_still_screen 2;
|
||||
# The menu stays opened, so hit Esc to dismiss it.
|
||||
send_key("esc");
|
||||
wait_still_screen 2;
|
||||
|
||||
# Check that night mode has been activated.
|
||||
assert_screen("evince_night_mode", timeout => 30);
|
||||
# Check that night mode has been activated.
|
||||
assert_screen("evince_night_mode", timeout => 30);
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {always_rollback => 1};
|
||||
return {always_rollback => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -6,22 +6,22 @@ use utils;
|
||||
# This part of the suite tests that Evince can show Document Properties.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
|
||||
# Open the menu.
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
# Open the menu.
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
|
||||
# Select the Properties item.
|
||||
assert_and_click("evince_menu_properties", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
# Select the Properties item.
|
||||
assert_and_click("evince_menu_properties", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
|
||||
# Check that Properties are shown.
|
||||
assert_screen("evince_properties_shown", timeout => 30);
|
||||
# Check that Properties are shown.
|
||||
assert_screen("evince_properties_shown", timeout => 30);
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {always_rollback => 1};
|
||||
return {always_rollback => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -7,31 +7,31 @@ use utils;
|
||||
|
||||
sub rotate_content {
|
||||
|
||||
# Open the application menu
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
# Open the application menu
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
|
||||
# Click with the *left* button (needle click area might need some correction)
|
||||
assert_and_click("evince_menu_rotate", button => "left", timeout => 30);
|
||||
# Click with the *left* button (needle click area might need some correction)
|
||||
assert_and_click("evince_menu_rotate", button => "left", timeout => 30);
|
||||
}
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
|
||||
# Rotate the content once.
|
||||
rotate_content();
|
||||
# Rotate the content once.
|
||||
rotate_content();
|
||||
|
||||
# Check that the window content has been rotated.
|
||||
assert_screen("evince_content_rotated_once", timeout => 30);
|
||||
# Check that the window content has been rotated.
|
||||
assert_screen("evince_content_rotated_once", timeout => 30);
|
||||
|
||||
# Rotate the content again.
|
||||
rotate_content();
|
||||
# Rotate the content again.
|
||||
rotate_content();
|
||||
|
||||
# Check that the window content has been rotated.
|
||||
assert_screen("evince_content_rotated_twice", timeout => 30);
|
||||
# Check that the window content has been rotated.
|
||||
assert_screen("evince_content_rotated_twice", timeout => 30);
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {always_rollback => 1};
|
||||
return {always_rollback => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -6,31 +6,31 @@ use utils;
|
||||
# This part of the suite tests tests that Evince can Save the document As another document.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
|
||||
# Open the menu.
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
# Open the menu.
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
|
||||
# Select Save As
|
||||
assert_and_click("evince_menu_saveas", button => "left", timeout => 30);
|
||||
# Select Save As
|
||||
assert_and_click("evince_menu_saveas", button => "left", timeout => 30);
|
||||
|
||||
# Type a new name.
|
||||
type_very_safely("alternative");
|
||||
# Type a new name.
|
||||
type_very_safely("alternative");
|
||||
|
||||
# Click on the Save button
|
||||
assert_and_click("gnome_button_save_blue", button => "left", timeout => 30);
|
||||
# Click on the Save button
|
||||
assert_and_click("gnome_button_save_blue", button => "left", timeout => 30);
|
||||
|
||||
# Now the document is saved under a different name. We will switch to the
|
||||
# terminal console to check that it has been created.
|
||||
$self->root_console(tty=>3);
|
||||
assert_script_run("ls /home/test/Documents/alternative.pdf");
|
||||
# Now the document is saved under a different name. We will switch to the
|
||||
# terminal console to check that it has been created.
|
||||
$self->root_console(tty => 3);
|
||||
assert_script_run("ls /home/test/Documents/alternative.pdf");
|
||||
|
||||
# Now, check that the new file does not differ from the original one.
|
||||
assert_script_run("diff /home/test/Documents/evince.pdf /home/test/Documents/alternative.pdf");
|
||||
# Now, check that the new file does not differ from the original one.
|
||||
assert_script_run("diff /home/test/Documents/evince.pdf /home/test/Documents/alternative.pdf");
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {always_rollback => 1};
|
||||
return {always_rollback => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -6,23 +6,23 @@ use utils;
|
||||
# This part of the suite tests the ability to search string in the text.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
|
||||
# Click on the Search button to search for text
|
||||
assert_and_click("evince_search_button", button => "left", timeout => 30);
|
||||
# Click on the Search button to search for text
|
||||
assert_and_click("evince_search_button", button => "left", timeout => 30);
|
||||
|
||||
# Type *pages*.
|
||||
type_very_safely("pages");
|
||||
# Press Enter.
|
||||
send_key("ret");
|
||||
# Type *pages*.
|
||||
type_very_safely("pages");
|
||||
# Press Enter.
|
||||
send_key("ret");
|
||||
|
||||
# Check that the typed text has been found.
|
||||
assert_screen("evince_search_found", timeout => 30);
|
||||
# Check that the typed text has been found.
|
||||
assert_screen("evince_search_found", timeout => 30);
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {always_rollback => 1};
|
||||
return {always_rollback => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -6,34 +6,34 @@ use utils;
|
||||
# This part of the suite tests that Evince displays shortcuts.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
|
||||
# Open the menu
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
# Open the menu
|
||||
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
|
||||
# Select the Keyboard Shortcuts item
|
||||
assert_and_click("evince_menu_shortcuts", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
# Select the Keyboard Shortcuts item
|
||||
assert_and_click("evince_menu_shortcuts", button => "left", timeout => 30);
|
||||
wait_still_screen 2;
|
||||
|
||||
# Check that Shortcuts has been shown
|
||||
assert_screen("evince_shortcuts_shown");
|
||||
# Check that Shortcuts has been shown
|
||||
assert_screen("evince_shortcuts_shown");
|
||||
|
||||
# Click on number 2 to arrive to the second page
|
||||
assert_and_click("evince_shortcuts_second", button => "left", timeout => 30);
|
||||
# Click on number 2 to arrive to the second page
|
||||
assert_and_click("evince_shortcuts_second", button => "left", timeout => 30);
|
||||
|
||||
# Check that Shortcuts 2 has been shown
|
||||
assert_screen("evince_shortcuts_second_shown");
|
||||
# Check that Shortcuts 2 has been shown
|
||||
assert_screen("evince_shortcuts_second_shown");
|
||||
|
||||
# Click on number 3 to arrive to the second page
|
||||
assert_and_click("evince_shortcuts_third", button => "left", timeout => 30);
|
||||
# Click on number 3 to arrive to the second page
|
||||
assert_and_click("evince_shortcuts_third", button => "left", timeout => 30);
|
||||
|
||||
# Check that Shortcuts 3 has been shown
|
||||
assert_screen("evince_shortcuts_third_shown");
|
||||
# Check that Shortcuts 3 has been shown
|
||||
assert_screen("evince_shortcuts_third_shown");
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {always_rollback => 1};
|
||||
return {always_rollback => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -12,11 +12,11 @@ sub run {
|
||||
solidify_wallpaper;
|
||||
}
|
||||
|
||||
# If this test fails, the others will probably start failing too,
|
||||
# If this test fails, the others will probably start failing too,
|
||||
# so there is no need to continue.
|
||||
# Also, when subsequent tests fail, the suite will revert to this state for further testing.
|
||||
sub test_flags {
|
||||
return { fatal => 1, milestone => 1 };
|
||||
return {fatal => 1, milestone => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_abrt', 'apps_menu_utilities');
|
||||
# Check that it is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_boxes');
|
||||
# We get tutorial on F32+, directly to main UI on F<32; we can
|
||||
@ -23,7 +23,7 @@ sub run {
|
||||
register_application("gnome-boxes");
|
||||
# Close the application
|
||||
quit_with_shortcut();
|
||||
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_calculator');
|
||||
# Check that it is started
|
||||
|
@ -7,10 +7,10 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_calendar');
|
||||
|
||||
|
||||
# give access to location if the vm asks for it
|
||||
if (check_screen('apps_run_access', 1)) {
|
||||
assert_and_click 'apps_run_access';
|
||||
@ -21,7 +21,7 @@ sub run {
|
||||
register_application("gnome-calendar");
|
||||
# close the application
|
||||
quit_with_shortcut();
|
||||
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_chars', 'apps_menu_utilities');
|
||||
# Check that is started
|
||||
@ -16,7 +16,7 @@ sub run {
|
||||
register_application("gnome-characters");
|
||||
# Close the application
|
||||
quit_with_shortcut();
|
||||
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_cheese');
|
||||
# Check that is started
|
||||
|
@ -18,7 +18,7 @@ sub run {
|
||||
register_application("gnome-clocks");
|
||||
# close the application
|
||||
quit_with_shortcut();
|
||||
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_diskusage', 'apps_menu_utilities');
|
||||
# Check that is started
|
||||
|
@ -3,7 +3,7 @@ use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
# This tests if Files starts
|
||||
# This tests if Files starts
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
@ -15,7 +15,7 @@ sub run {
|
||||
register_application("nautilus");
|
||||
# Close the application
|
||||
quit_with_shortcut();
|
||||
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_fonts', 'apps_menu_utilities');
|
||||
# Check that is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_imageviewer', 'apps_menu_utilities');
|
||||
# Check that is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_lcalc');
|
||||
# Dismiss 'tip of the day' if necessary
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_logs', 'apps_menu_utilities');
|
||||
# Check that is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_maps');
|
||||
# Check that is started
|
||||
@ -20,7 +20,7 @@ sub run {
|
||||
register_application("gnome-maps");
|
||||
# Close the application
|
||||
quit_with_shortcut();
|
||||
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_monitor');
|
||||
# Check that is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_photos');
|
||||
# Check that is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_rhythmbox');
|
||||
# Check that is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_scan');
|
||||
# Check that is started
|
||||
@ -16,7 +16,7 @@ sub run {
|
||||
register_application("simple-scan");
|
||||
# Close the application
|
||||
quit_with_shortcut();
|
||||
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_screenshot', 'apps_menu_utilities');
|
||||
# Check that is started
|
||||
@ -16,7 +16,7 @@ sub run {
|
||||
register_application("gnome-screenshot");
|
||||
# Close the application
|
||||
quit_with_shortcut();
|
||||
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -11,11 +11,11 @@ sub run {
|
||||
send_key 'alt-f1';
|
||||
type_very_safely 'settings';
|
||||
send_key 'ret';
|
||||
|
||||
|
||||
# select Background menu item
|
||||
assert_and_click 'apps_settings_menu_background';
|
||||
wait_still_screen 5;
|
||||
|
||||
|
||||
# close the application
|
||||
send_key 'alt-f4';
|
||||
wait_still_screen 5;
|
||||
@ -24,7 +24,7 @@ sub run {
|
||||
assert_screen 'workspace';
|
||||
# Register application
|
||||
register_application("gnome-control-center");
|
||||
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -7,11 +7,11 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_software');
|
||||
|
||||
|
||||
|
||||
|
||||
# check if a welcome screen appears, if so, click on it
|
||||
if (check_screen('apps_run_software_welcome', 1)) {
|
||||
assert_and_click 'apps_run_software_welcome';
|
||||
@ -22,7 +22,7 @@ sub run {
|
||||
register_application("gnome-software");
|
||||
# Close the application
|
||||
quit_with_shortcut();
|
||||
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -12,7 +12,7 @@ sub run {
|
||||
send_key 'alt-f1';
|
||||
wait_still_screen 2;
|
||||
type_very_safely 'terminal';
|
||||
send_key 'ret';
|
||||
send_key 'ret';
|
||||
wait_still_screen 5;
|
||||
assert_screen "apps_run_terminal";
|
||||
|
||||
@ -23,11 +23,11 @@ sub run {
|
||||
quit_with_shortcut();
|
||||
}
|
||||
|
||||
# If this test fails, the others will probably start failing too,
|
||||
# If this test fails, the others will probably start failing too,
|
||||
# so there is no need to continue.
|
||||
# Also, when subsequent tests fail, the suite will revert to this state for further testing.
|
||||
sub test_flags {
|
||||
return { fatal => 1, milestone => 1 };
|
||||
return {fatal => 1, milestone => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_texteditor');
|
||||
# Check that is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_videos');
|
||||
# Check that is started
|
||||
|
@ -19,7 +19,7 @@ sub run {
|
||||
register_application("gnome-weather");
|
||||
# close the application
|
||||
quit_with_shortcut();
|
||||
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
menu_launch_type 'contactthemeeditor';
|
||||
# Check that it is started
|
||||
assert_screen 'cteditor_runs';
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
menu_launch_type 'dbusviewer';
|
||||
# Check that it is started
|
||||
assert_screen 'dbusviewer_runs';
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
menu_launch_type 'discover';
|
||||
# Check that it is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
menu_launch_type 'dnfdragora';
|
||||
# Check that it is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
menu_launch_type 'dolphin';
|
||||
# Check that it is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
menu_launch_type 'firefox';
|
||||
# Check that it is started; this needle is from
|
||||
|
@ -7,14 +7,14 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
menu_launch_type 'firewall';
|
||||
sleep 5;
|
||||
# Firewall requires password to be entered and confirmed to start.
|
||||
# View password
|
||||
assert_screen "auth_required";
|
||||
my $password = get_var('ROOT_PASSWORD','weakpassword');
|
||||
my $password = get_var('ROOT_PASSWORD', 'weakpassword');
|
||||
type_very_safely $password;
|
||||
send_key 'ret';
|
||||
sleep 5;
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
menu_launch_type 'gwenview';
|
||||
# Check that it is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
menu_launch_type 'help';
|
||||
# Check that it is started
|
||||
|
@ -9,7 +9,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
menu_launch_type 'info';
|
||||
# Check that it is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
menu_launch_type 'kaddressbook';
|
||||
# Check that it is started
|
||||
|
@ -7,7 +7,7 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
|
||||
# Start the application
|
||||
menu_launch_type 'kcalc';
|
||||
# Check that it is started
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user