forked from QubesOS/openqa-tests-qubesos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.pm
182 lines (161 loc) · 6.12 KB
/
main.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# The Qubes OS Project, https://www.qubes-os.org/
#
# Copyright (C) 2018 Marek Marczykowski-Górecki <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
use strict;
use testapi;
use autotest;
require 'qubesdistribution.pm';
testapi::set_distribution(qubesdistribution->new());
if (get_var('ISO')) {
autotest::loadtest "tests/isosize.pm";
if (get_var('INSTALL_ISO_FILE')) {
autotest::loadtest "tests/install_iso_file.pm";
} else {
autotest::loadtest "tests/install_startup.pm";
}
if (get_var('INSTALL_OVER_EXISTING')) {
autotest::loadtest "tests/install_preexisting_system.pm";
autotest::loadtest "tests/install_startup_2.pm";
}
autotest::loadtest "tests/install_welcome.pm";
if (get_var('KEYBOARD_LAYOUT')) {
autotest::loadtest "tests/install_keyboard.pm";
}
if (get_var('PARTITIONING')) {
autotest::loadtest "tests/install_partitioning_" . get_var('PARTITIONING') . ".pm";
} else {
autotest::loadtest "tests/install_partitioning_default.pm";
}
if (check_var("VERSION", "4.0")) {
autotest::loadtest "tests/install_templates.pm";
}
autotest::loadtest "tests/install_do_user.pm";
autotest::loadtest "tests/install_fixups.pm";
autotest::loadtest "tests/firstboot.pm";
if (get_var("INSTALL_TEMPLATES") =~ /\d+/) {
# if a specific template version was requested, add it now
autotest::loadtest "tests/update_templates.pm";
}
if (check_var('INSTALL_TEMPLATES', 'all') or get_var("INSTALL_TEMPLATES") =~ /whonix/) {
autotest::loadtest "tests/whonix_firstrun.pm";
}
# 4.1+ can set default template in firstboot
if (get_var("DEFAULT_TEMPLATE") and check_var("VERSION", "4.0")) {
autotest::loadtest "tests/switch_template.pm";
}
} else {
autotest::loadtest "tests/startup.pm";
if (get_var('DO_UPDATE')) {
if (get_var('UPDATE_TEMPLATES')) {
autotest::loadtest "tests/update_templates.pm";
}
if (get_var('UPDATE') || get_var('SALT_SYSTEM_TESTS')) {
autotest::loadtest "tests/update.pm";
}
if (get_var("SELINUX_TEMPLATES")) {
autotest::loadtest "tests/selinux_install.pm";
}
if (get_var('GUIVM')) {
autotest::loadtest "tests/update_guivm.pm";
}
}
if (get_var("DEFAULT_TEMPLATE")) {
autotest::loadtest "tests/switch_template.pm";
}
if (get_var('PARTITIONING')) {
autotest::loadtest "tests/switch_pool.pm";
}
}
if (check_var('RELEASE_UPGRADE', '1')) {
autotest::loadtest "tests/release_upgrade.pm";
}
if (get_var('DO_GUIVM')) {
if (get_var('UPDATE_TEMPLATES')) {
autotest::loadtest "tests/update_templates.pm";
autotest::loadtest "tests/update_post_templates.pm";
}
if (get_var('GUIVM')) {
autotest::loadtest "tests/update_guivm.pm";
}
}
if (get_var('PIPEWIRE')) {
autotest::loadtest "tests/pipewire_install.pm";
}
# do not execute same tests before each system tests run
if (check_var('TEST_GENERIC', '1') and
(!get_var('DO_UPDATE') or check_var('RESTART_AFTER_UPDATE', '1'))) {
autotest::loadtest "tests/mount_and_boot_options.pm";
autotest::loadtest "tests/usbvm.pm";
}
if (check_var('TEST_GUIVM', '1')) {
autotest::loadtest "tests/guivm_startup.pm";
autotest::loadtest "tests/guivm_manager.pm";
}
if (check_var('TEST_SUSPEND', '1')) {
autotest::loadtest "tests/suspend.pm";
}
if (get_var("WHONIXCHECK")) {
autotest::loadtest "tests/whonixcheck.pm";
}
if (get_var("WHONIX_INTERACTIVE")) {
autotest::loadtest "tests/whonix_torbrowser.pm";
}
if (get_var('SYSTEM_TESTS')) {
if (check_var('SYSTEM_TESTS', 'qubesmanager.tests')) {
autotest::loadtest "tests/system_tests_prepare_manager.pm";
}
autotest::loadtest "tests/system_tests.pm";
}
if (get_var('TEST_GUI_INTERACTIVE')) {
autotest::loadtest "tests/simple_gui_apps.pm";
autotest::loadtest "tests/clipboard_and_web.pm";
autotest::loadtest "tests/gui_filecopy.pm";
autotest::loadtest "tests/screenlocker_idle_watch.pm";
autotest::loadtest "tests/screenlocker_leaks.pm";
autotest::loadtest "tests/screenlocker_disable.pm";
autotest::loadtest "tests/gui_keyboard_layout.pm";
}
if (get_var("WINDOWS_VERSION")) {
autotest::loadtest "tests/windows_install.pm";
}
if (get_var("TEST_WINDOWS_GUI_INTERACTIVE")) {
autotest::loadtest "tests/windows_clipboard_and_filecopy.pm";
autotest::loadtest "tests/suspend_windows.pm";
}
if (get_var("GUI_TESTS")) {
autotest::loadtest "tests/qui_widgets_clipboard.pm";
autotest::loadtest "tests/qui_widgets_devices.pm";
autotest::loadtest "tests/qui_widgets_disk_space.pm";
autotest::loadtest "tests/qui_widgets_domains.pm";
autotest::loadtest "tests/qui_widgets_notifications.pm";
autotest::loadtest "tests/qui_widgets_update.pm";
autotest::loadtest "tests/qubesmanager_backuprestore.pm";
autotest::loadtest "tests/qubesmanager_createnewvm.pm";
autotest::loadtest "tests/qubesmanager_globalsettings.pm";
autotest::loadtest "tests/qubesmanager_manager.pm";
autotest::loadtest "tests/qubesmanager_templatemanager.pm";
autotest::loadtest "tests/qubesmanager_vmsettings.pm";
}
if (get_var('TEST_GUI_INTERACTIVE')) {
# collect logs from some successful test that is scheduled on all hw*
# workers
autotest::loadtest "tests/collect_logs.pm";
}
if (get_var("STORE_HDD_1") || get_var("PUBLISH_HDD_1")) {
autotest::loadtest "tests/shutdown.pm";
}
1;
# vim: set sw=4 et: