2019-09-19 14:03:50 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
use utils;
|
|
|
|
|
|
|
|
# This test collects the results of application registration (presence or absence).
|
|
|
|
|
|
|
|
sub run {
|
|
|
|
my $self = shift;
|
2024-06-12 12:35:00 +00:00
|
|
|
my $subvariant = get_var("SUBVARIANT");
|
2022-07-28 20:32:57 +00:00
|
|
|
$self->root_console(tty => 3);
|
2019-09-19 14:03:50 +00:00
|
|
|
|
2024-06-12 12:35:00 +00:00
|
|
|
my @core_applications;
|
2019-09-19 14:03:50 +00:00
|
|
|
# List of applications, that we want to track for their presence.
|
2024-06-12 12:35:00 +00:00
|
|
|
unless ($subvariant eq "Silverblue") {
|
2024-08-13 13:38:24 +00:00
|
|
|
my @core_applications = ("gnome-software", "firefox", "terminal", "nautilus", "gnome-text-editor", "gnome-boxes");
|
2024-06-12 12:35:00 +00:00
|
|
|
}
|
|
|
|
else {
|
2024-08-13 13:38:24 +00:00
|
|
|
my @core_applications = ("gnome-software", "firefox", "terminal", "nautilus", "gnome-text-editor");
|
2024-06-12 12:35:00 +00:00
|
|
|
}
|
2019-09-19 14:03:50 +00:00
|
|
|
|
|
|
|
# Evaluate the results, make the log files and pass or fail the entire
|
|
|
|
# test suite.
|
|
|
|
my $failed;
|
|
|
|
foreach my $app (@core_applications) {
|
|
|
|
# @utils::application_list here is the list of registered apps
|
2022-07-28 20:32:57 +00:00
|
|
|
if (grep { $_ eq $app } @utils::application_list) {
|
2019-09-19 14:03:50 +00:00
|
|
|
assert_script_run "echo '$app=passed' >> registered.log";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
assert_script_run "echo '$app=failed' >> registered.log";
|
|
|
|
$failed = 1;
|
|
|
|
}
|
|
|
|
}
|
2022-07-28 20:32:57 +00:00
|
|
|
upload_logs "registered.log", failok => 1;
|
2019-09-19 14:03:50 +00:00
|
|
|
die "Some core applications could not be started. Check logs." if ($failed);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
|
|
|
return {fatal => 1};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|