-
Notifications
You must be signed in to change notification settings - Fork 23
/
main.pm
70 lines (60 loc) · 2.01 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
#!/usr/bin/perl -w
use Mojo::Base -strict, -signatures;
use testapi;
use autotest;
use needle;
my $distri = testapi::get_var('CASEDIR') . '/lib/susedistribution.pm';
require $distri;
testapi::set_distribution(susedistribution->new());
$testapi::password //= get_var('PASSWORD');
$testapi::password //= 'nots3cr3t';
sub loadtest ($test) {
my $filename = $test =~ /\.p[my]$/ ? $test : $test . '.pm';
autotest::loadtest("tests/$filename");
}
sub load_install_tests() {
loadtest 'install/boot';
loadtest 'install/prepare';
loadtest 'install/openqa_webui';
# for now when testing from git only tests the webui itself, not worker
# interaction
return 1 if get_var('OPENQA_FROM_GIT');
loadtest 'install/openqa_worker' unless get_var('OPENQA_FROM_BOOTSTRAP');
loadtest 'install/worker_ay_validation' if get_var('VALIDATE_AUTOYAST');
loadtest 'install/apparmor' if get_var('USE_APPARMOR');
loadtest 'install/test_distribution';
}
sub load_osautoinst_tests() {
loadtest 'osautoinst/worker';
loadtest 'osautoinst/start_test';
loadtest 'osautoinst/test_running';
}
sub load_openQA_tests() {
if (get_var('OPENQA_CONTAINERS')) {
loadtest 'containers/build';
loadtest 'containers/setup_env';
loadtest 'containers/multiple_container_webui';
loadtest 'containers/single_container_webui';
loadtest 'containers/worker';
}
else {
loadtest 'openQA/dashboard';
loadtest 'openQA/login';
# testing from git does not schedule tests so far
loadtest 'openQA/tests' unless get_var('OPENQA_FROM_GIT');
}
}
sub load_python_tests() {
loadtest 'openQA/search.py';
}
sub load_shutdown() {
loadtest 'shutdown/shutdown';
}
# load tests in the right order
load_install_tests();
# testing from git only tests webui so far
load_osautoinst_tests() unless get_var('OPENQA_FROM_GIT');
load_openQA_tests() unless get_var('FULL_MM_TEST');
load_python_tests() if get_var('LOAD_PYTHON_TEST_MODULES', 1) && !get_var('FULL_MM_TEST');
load_shutdown();
1;