forked from os-autoinst/os-autoinst-distri-opensuse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.pm
1401 lines (1322 loc) · 46.7 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SUSE's openQA tests
#
# Copyright © 2009-2013 Bernhard M. Wiedemann
# Copyright © 2012-2016 SUSE LLC
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
use strict;
use warnings;
use testapi qw(check_var get_var set_var);
use lockapi;
use needle;
use File::Find;
use File::Basename;
BEGIN {
unshift @INC, dirname(__FILE__) . '/../../lib';
}
use utils;
use main_common;
init_main();
sub is_server {
return is_sles4sap() || get_var('FLAVOR', '') =~ /^Server/;
}
sub is_desktop {
return get_var('FLAVOR', '') =~ /^Desktop/;
}
sub is_sles4sap {
return get_var('FLAVOR', '') =~ /SAP/;
}
sub is_sles4sap_standard {
return is_sles4sap && check_var('SLES4SAP_MODE', 'sles');
}
sub is_smt {
return (get_var("PATTERNS", '') || get_var('HDD_1', '')) =~ /smt/;
}
sub is_kgraft() {
return get_var('FLAVOR', '') =~ /^KGraft/;
}
sub is_new_installation {
return !get_var('UPGRADE') && !get_var('ONLINE_MIGRATION') && !get_var('ZDUP') && !get_var('AUTOUPGRADE');
}
sub is_update_test_repo_test {
return get_var('TEST') !~ /^mru-/ && (get_var('FLAVOR', '') =~ /-Updates$/);
}
sub cleanup_needles {
remove_common_needles;
if ((get_var('VERSION', '') ne '12') && (get_var('BASE_VERSION', '') ne '12')) {
unregister_needle_tags("ENV-VERSION-12");
}
if ((get_var('VERSION', '') ne '12-SP1') && (get_var('BASE_VERSION', '') ne '12-SP1')) {
unregister_needle_tags("ENV-VERSION-12-SP1");
}
if ((get_var('VERSION', '') ne '12-SP2') && (get_var('BASE_VERSION', '') ne '12-SP2')) {
unregister_needle_tags("ENV-VERSION-12-SP2");
}
if ((get_var('VERSION', '') ne '12-SP3') && (get_var('BASE_VERSION', '') ne '12-SP3')) {
unregister_needle_tags("ENV-VERSION-12-SP3");
}
my $tounregister = sle_version_at_least('12-SP2') ? '0' : '1';
unregister_needle_tags("ENV-SP2ORLATER-$tounregister");
$tounregister = sle_version_at_least('12-SP3') ? '0' : '1';
unregister_needle_tags("ENV-SP3ORLATER-$tounregister");
if (!is_server) {
unregister_needle_tags("ENV-FLAVOR-Server-DVD");
}
if (!is_desktop) {
unregister_needle_tags("ENV-FLAVOR-Desktop-DVD");
}
if (!is_jeos) {
unregister_needle_tags('ENV-FLAVOR-JeOS-for-kvm');
}
if (!is_casp) {
unregister_needle_tags('ENV-DISTRI-CASP');
}
if (get_var('OFW')) {
unregister_needle_tags('ENV-OFW-0');
}
else {
unregister_needle_tags('ENV-OFW-1');
}
}
my $distri = testapi::get_var("CASEDIR") . '/lib/susedistribution.pm';
require $distri;
testapi::set_distribution(susedistribution->new());
unless (get_var("DESKTOP")) {
if (check_var("VIDEOMODE", "text")) {
set_var("DESKTOP", "textmode");
}
else {
set_var("DESKTOP", "gnome");
}
}
# SLE specific variables
set_var('NOAUTOLOGIN', 1);
set_var('HASLICENSE', 1);
# Set serial console for Xen PV
if (check_var('VIRSH_VMM_FAMILY', 'xen') && check_var('VIRSH_VMM_TYPE', 'linux')) {
if (sle_version_at_least('12-SP2')) {
set_var('SERIALDEV', 'hvc0');
}
else {
set_var('SERIALDEV', 'xvc0');
}
}
if (sle_version_at_least('12-SP2')) {
set_var('SP2ORLATER', 1);
}
if (sle_version_at_least('12-SP3')) {
set_var('SP3ORLATER', 1);
}
if (!get_var('NETBOOT')) {
set_var('DVD', 1);
}
if (check_var('DESKTOP', 'minimalx')) {
set_var("XDMUSED", 1);
}
if (get_var('HDD_1', '') =~ /\D*-11-\S*/) {
set_var('FILESYSTEM', 'ext4');
}
unless (get_var('PACKAGETOINSTALL')) {
set_var("PACKAGETOINSTALL", "x3270");
}
set_var("WALLPAPER", '/usr/share/wallpapers/SLEdefault/contents/images/1280x1024.jpg');
# set KDE and GNOME, ...
set_var(uc(get_var('DESKTOP')), 1);
# SLE needs auth for shutdown
if (!defined get_var('SHUTDOWN_NEEDS_AUTH') && !is_desktop) {
set_var('SHUTDOWN_NEEDS_AUTH', 1);
}
# for GNOME pressing enter is enough to login bernhard
if (check_var('DESKTOP', 'minimalx')) {
set_var('DM_NEEDS_USERNAME', 1);
}
# Always register at scc and use the test updates if the Flavor is -Updates.
# This way we can reuse existant test suites without having to patch their
# settings
if (is_update_test_repo_test && !get_var('MAINT_TEST_REPO')) {
my $repos = get_var('OS_TEST_REPO');
my @addons = split(/,/, get_var('SCC_ADDONS', ''));
for my $a (split(/,/, get_var('ADDONS', ''))) {
push(@addons, $a);
}
# move ADDONS to SCC_ADDONS for maintenance
set_var('ADDONS', '');
for my $a (@addons) {
if ($a) {
$repos .= "," . get_var(uc($a) . '_TEST_REPO');
}
}
set_var('SCC_ADDONS', join(',', @addons));
set_var('MAINT_TEST_REPO', $repos);
set_var('SCC_REGISTER', 'installation');
}
$needle::cleanuphandler = \&cleanup_needles;
# dump other important ENV:
logcurrentenv(
qw(ADDONURL BTRFS DESKTOP HW HWSLOT LVM MOZILLATEST
NOINSTALL UPGRADE USBBOOT ZDUP ZDUPREPOS TEXTMODE
DISTRI NOAUTOLOGIN QEMUCPU QEMUCPUS RAIDLEVEL ENCRYPT INSTLANG
QEMUVGA DOCRUN UEFI DVD GNOME KDE ISO ISO_MAXSIZE NETBOOT USEIMAGES
PROMO QEMUVGA SPLITUSR VIDEOMODE)
);
sub need_clear_repos() {
return get_var("FLAVOR", '') =~ m/^Staging2?[\-]DVD$/ && get_var("SUSEMIRROR");
}
sub have_scc_repos() {
return check_var('SCC_REGISTER', 'console');
}
sub have_addn_repos() {
return
!get_var("NET")
&& !get_var("EVERGREEN")
&& get_var("SUSEMIRROR")
&& !get_var("FLAVOR", '') =~ m/^Staging2?[\-]DVD$/;
}
sub rt_is_applicable() {
return is_server() && get_var("ADDONS", "") =~ /rt/;
}
sub we_is_applicable() {
return is_server()
&& (get_var("ADDONS", "") =~ /we/ or get_var("SCC_ADDONS", "") =~ /we/ or get_var("ADDONURL", "") =~ /we/);
}
sub uses_qa_net_hardware() {
return check_var("BACKEND", "ipmi") || check_var("BACKEND", "generalhw");
}
sub load_x11regression_firefox() {
loadtest "x11regressions/firefox/sle12/firefox_smoke";
loadtest "x11regressions/firefox/sle12/firefox_localfiles";
loadtest "x11regressions/firefox/sle12/firefox_emaillink";
loadtest "x11regressions/firefox/sle12/firefox_urlsprotocols";
loadtest "x11regressions/firefox/sle12/firefox_downloading";
loadtest "x11regressions/firefox/sle12/firefox_extcontent";
loadtest "x11regressions/firefox/sle12/firefox_headers";
loadtest "x11regressions/firefox/sle12/firefox_pdf";
loadtest "x11regressions/firefox/sle12/firefox_changesaving";
loadtest "x11regressions/firefox/sle12/firefox_fullscreen";
loadtest "x11regressions/firefox/sle12/firefox_health";
loadtest "x11regressions/firefox/sle12/firefox_flashplayer";
loadtest "x11regressions/firefox/sle12/firefox_java";
loadtest "x11regressions/firefox/sle12/firefox_pagesaving";
loadtest "x11regressions/firefox/sle12/firefox_private";
loadtest "x11regressions/firefox/sle12/firefox_mhtml";
loadtest "x11regressions/firefox/sle12/firefox_plugins";
loadtest "x11regressions/firefox/sle12/firefox_extensions";
loadtest "x11regressions/firefox/sle12/firefox_appearance";
loadtest "x11regressions/firefox/sle12/firefox_gnomeshell";
loadtest "x11regressions/firefox/sle12/firefox_passwd";
loadtest "x11regressions/firefox/sle12/firefox_html5";
loadtest "x11regressions/firefox/sle12/firefox_developertool";
loadtest "x11regressions/firefox/sle12/firefox_rss";
loadtest "x11regressions/firefox/sle12/firefox_ssl";
if (!get_var("OFW") && check_var('BACKEND', 'qemu')) {
loadtest "x11/firefox_audio";
}
}
sub load_x11regression_gnome() {
if (check_var("DESKTOP", "gnome")) {
loadtest "x11regressions/gnomecase/nautilus_cut_file";
loadtest "x11regressions/gnomecase/nautilus_permission";
loadtest "x11regressions/gnomecase/nautilus_open_ftp";
loadtest "x11regressions/gnomecase/application_starts_on_login";
loadtest "x11regressions/gnomecase/change_password";
loadtest "x11regressions/gnomecase/login_test";
loadtest "x11regressions/gnomecase/gnome_classic_switch";
loadtest "x11regressions/gnomecase/gnome_default_applications";
loadtest "x11regressions/gnomecase/gnome_window_switcher";
}
}
sub load_x11regression_documentation() {
if (check_var("DESKTOP", "gnome")) {
loadtest "x11regressions/gnote/gnote_first_run";
loadtest "x11regressions/gnote/gnote_link_note";
loadtest "x11regressions/gnote/gnote_rename_title";
loadtest "x11regressions/gnote/gnote_undo_redo";
loadtest "x11regressions/gnote/gnote_edit_format";
loadtest "x11regressions/gnote/gnote_search_all";
loadtest "x11regressions/gnote/gnote_search_body";
loadtest "x11regressions/gnote/gnote_search_title";
loadtest "x11regressions/evince/evince_open";
loadtest "x11regressions/evince/evince_view";
loadtest "x11regressions/evince/evince_rotate_zoom";
loadtest "x11regressions/evince/evince_find";
loadtest "x11regressions/gedit/gedit_launch";
loadtest "x11regressions/gedit/gedit_save";
if (not get_var("SP2ORLATER")) {
loadtest "x11regressions/gedit/gedit_about";
}
loadtest "x11regressions/libreoffice/libreoffice_mainmenu_favorites";
loadtest "x11regressions/libreoffice/libreoffice_mainmenu_components";
loadtest "x11regressions/libreoffice/libreoffice_recent_documents";
loadtest "x11regressions/libreoffice/libreoffice_default_theme";
loadtest "x11regressions/libreoffice/libreoffice_pyuno_bridge";
loadtest "x11regressions/libreoffice/libreoffice_open_specified_file";
loadtest "x11regressions/libreoffice/libreoffice_double_click_file";
}
}
sub load_x11regression_message() {
if (check_var("DESKTOP", "gnome")) {
loadtest "x11regressions/empathy/empathy_aim";
loadtest "x11regressions/empathy/empathy_irc";
loadtest "x11regressions/evolution/evolution_smoke";
loadtest "x11regressions/evolution/evolution_mail_imap";
loadtest "x11regressions/evolution/evolution_mail_pop";
loadtest "x11regressions/evolution/evolution_timezone_setup";
loadtest "x11regressions/evolution/evolution_meeting_imap";
loadtest "x11regressions/evolution/evolution_meeting_pop";
}
if (get_var("DESKTOP") =~ /kde|gnome/) {
loadtest "x11regressions/pidgin/prep_pidgin";
loadtest "x11regressions/pidgin/pidgin_IRC";
loadtest "x11regressions/pidgin/pidgin_aim";
loadtest "x11regressions/pidgin/clean_pidgin";
}
}
sub load_x11regression_other() {
if (check_var("DESKTOP", "gnome")) {
loadtest "x11regressions/shotwell/shotwell_import";
loadtest "x11regressions/shotwell/shotwell_edit";
loadtest "x11regressions/shotwell/shotwell_export";
loadtest "virtualization/yast_virtualization";
loadtest "virtualization/virtman_view";
}
if (get_var("DESKTOP") =~ /kde|gnome/) {
loadtest "x11regressions/tracker/prep_tracker";
loadtest "x11regressions/tracker/tracker_starts";
loadtest "x11regressions/tracker/tracker_searchall";
loadtest "x11regressions/tracker/tracker_pref_starts";
loadtest "x11regressions/tracker/tracker_open_apps";
loadtest "x11regressions/tracker/tracker_by_command";
loadtest "x11regressions/tracker/tracker_info";
loadtest "x11regressions/tracker/tracker_search_in_nautilus";
loadtest "x11regressions/tracker/tracker_mainmenu";
loadtest "x11regressions/tracker/clean_tracker";
}
}
sub load_x11regression_remote() {
# load onetime vncsession testing
if (check_var('REMOTE_DESKTOP_TYPE', 'one_time_vnc')) {
loadtest 'x11regressions/remote_desktop/onetime_vncsession_xvnc_tigervnc';
loadtest 'x11regressions/remote_desktop/onetime_vncsession_xvnc_java';
loadtest 'x11regressions/remote_desktop/onetime_vncsession_multilogin_failed';
}
# load persistemt vncsession, x11 forwarding, xdmcp with gdm testing
elsif (check_var('REMOTE_DESKTOP_TYPE', 'persistent_vnc')) {
loadtest 'x11regressions/remote_desktop/persistent_vncsession_xvnc';
loadtest 'x11regressions/remote_desktop/x11_forwarding_openssh';
loadtest 'x11regressions/remote_desktop/xdmcp_gdm';
}
# load xdmcp with xdm testing
elsif (check_var('REMOTE_DESKTOP_TYPE', 'xdmcp_xdm')) {
loadtest 'x11regressions/remote_desktop/xdmcp_xdm';
}
# load vino testing
elsif (check_var('REMOTE_DESKTOP_TYPE', 'vino_server')) {
loadtest 'x11regressions/remote_desktop/vino_server';
}
elsif (check_var('REMOTE_DESKTOP_TYPE', 'vino_client')) {
loadtest 'x11regressions/remote_desktop/vino_client';
}
}
sub load_boot_tests() {
if (get_var("ISO_MAXSIZE")) {
loadtest "installation/isosize";
}
if (get_var("OFW")) {
loadtest "installation/bootloader_ofw";
}
elsif ((get_var("UEFI") || is_jeos()) && !check_var("BACKEND", "svirt")) {
loadtest "installation/bootloader_uefi";
}
elsif (check_var("BACKEND", "svirt") && !check_var("ARCH", "s390x")) {
if (check_var("VIRSH_VMM_FAMILY", "hyperv")) {
loadtest "installation/bootloader_hyperv";
}
else {
loadtest "installation/bootloader_svirt";
}
# TODO: rename to bootloader_grub2
# Unless GRUB2 supports framebuffer on Xen PV (bsc#961638), grub2 tests
# has to be skipped there.
if (!(check_var('VIRSH_VMM_FAMILY', 'xen') && check_var('VIRSH_VMM_TYPE', 'linux'))) {
if (get_var("UEFI") || is_jeos) {
loadtest "installation/bootloader_uefi";
}
elsif (!get_var('NETBOOT')) {
loadtest "installation/bootloader";
}
}
}
elsif (uses_qa_net_hardware()) {
loadtest "boot/boot_from_pxe";
}
elsif (check_var("ARCH", "s390x")) {
if (check_var('BACKEND', 's390x')) {
loadtest "installation/bootloader_s390";
}
else {
loadtest "installation/bootloader_zkvm";
}
}
elsif (get_var("PXEBOOT")) {
set_var("DELAYED_START", "1");
loadtest "autoyast/pxe_boot";
}
else {
loadtest "installation/bootloader";
}
}
sub install_this_version {
return !check_var('INSTALL_TO_OTHERS', 1);
}
sub load_inst_tests() {
loadtest "installation/welcome";
if (get_var('DUD_ADDONS')) {
loadtest "installation/dud_addon";
}
if (get_var('IBFT')) {
loadtest "installation/iscsi_configuration";
}
if (check_var('ARCH', 's390x')) {
if (check_var('BACKEND', 's390x')) {
loadtest "installation/disk_activation";
}
elsif (!sle_version_at_least('12-SP2')) {
loadtest "installation/skip_disk_activation";
}
}
if (get_var('ENCRYPT_CANCEL_EXISTING') || get_var('ENCRYPT_ACTIVATE_EXISTING')) {
loadtest "installation/encrypted_volume_activation";
}
if (get_var('MULTIPATH')) {
loadtest "installation/multipath";
}
if (get_var('UPGRADE')) {
loadtest "installation/upgrade_select";
if (check_var("UPGRADE", "LOW_SPACE")) {
loadtest "installation/disk_space_fill";
}
}
if (get_var('SCC_REGISTER', '') eq 'installation') {
loadtest "installation/scc_registration";
}
else {
loadtest "installation/skip_registration";
}
if (is_sles4sap) {
loadtest "installation/sles4sap_product_installation_mode";
}
if (get_var('MAINT_TEST_REPO')) {
loadtest 'installation/add_update_test_repo';
}
loadtest "installation/addon_products_sle";
if (noupdatestep_is_applicable()) {
if ( check_var('ARCH', 'x86_64')
&& sle_version_at_least('12-SP2')
&& is_server()
&& (!is_sles4sap() || is_sles4sap_standard())
&& install_this_version())
{
loadtest "installation/system_role";
}
loadtest "installation/partitioning";
if (defined(get_var("RAIDLEVEL"))) {
loadtest "installation/partitioning_raid";
}
elsif (get_var("LVM")) {
loadtest "installation/partitioning_lvm";
}
elsif (get_var('FULL_LVM_ENCRYPT')) {
loadtest 'installation/partitioning_full_lvm';
}
if (get_var("FILESYSTEM")) {
if (get_var('PARTITIONING_WARNINGS')) {
loadtest 'installation/partitioning_warnings';
}
loadtest "installation/partitioning_filesystem";
}
if (get_var("TOGGLEHOME")) {
loadtest "installation/partitioning_togglehome";
if (get_var('LVM') && get_var('RESIZE_ROOT_VOLUME')) {
loadtest "installation/partitioning_resize_root";
}
}
if (get_var("ENLARGESWAP") && get_var("QEMURAM", 1024) > 4098) {
loadtest "installation/installation_enlargeswap";
}
if (get_var("SPLITUSR")) {
loadtest "installation/partitioning_splitusr";
}
if (get_var("IBFT")) {
loadtest "installation/partitioning_iscsi";
}
if (uses_qa_net_hardware()) {
loadtest "installation/partitioning_firstdisk";
}
loadtest "installation/partitioning_finish";
}
# the VNC gadget is too unreliable to click, but we
# need to be able to do installations on it. The release notes
# functionality needs to be covered by other backends
if (!check_var('BACKEND', 'generalhw')) {
loadtest "installation/releasenotes";
}
if (noupdatestep_is_applicable()) {
loadtest "installation/installer_timezone";
# the test should run only in scenarios, where installed
# system is not being tested (e.g. INSTALLONLY etc.)
if ( !consolestep_is_applicable()
and !get_var("REMOTE_CONTROLLER")
and !check_var('BACKEND', 's390x')
and sle_version_at_least('12-SP2'))
{
loadtest "installation/hostname_inst";
}
if (!get_var("REMOTE_CONTROLLER")) {
loadtest "installation/logpackages";
}
if (is_sles4sap()) {
if (check_var("SLES4SAP_MODE", 'sles')) {
loadtest "installation/user_settings";
} # sles4sap wizard installation doesn't have user_settings step
}
elsif (get_var('IMPORT_USER_DATA')) {
loadtest 'installation/user_import';
}
else {
loadtest "installation/user_settings";
}
loadtest "installation/user_settings_root";
if (get_var('PATTERNS') || get_var('PACKAGES')) {
loadtest "installation/installation_overview_before";
loadtest "installation/select_patterns_and_packages";
}
elsif (!check_var('DESKTOP', 'gnome')) {
loadtest "installation/installation_overview_before";
loadtest "installation/change_desktop";
}
}
if (get_var("UEFI") && get_var("SECUREBOOT")) {
loadtest "installation/secure_boot";
}
# for upgrades on s390 zKVM we need to change the static ip adress of the image to reboot properly
if (check_var('BACKEND', 'svirt') && check_var('ARCH', 's390x') && get_var('UPGRADE')) {
loadtest "installation/set_static_ip";
}
if (installyaststep_is_applicable()) {
loadtest "installation/installation_overview";
if (check_var("UPGRADE", "LOW_SPACE")) {
loadtest "installation/disk_space_release";
}
if (ssh_key_import) {
loadtest "installation/ssh_key_setup";
}
loadtest "installation/start_install";
}
loadtest "installation/install_and_reboot";
if (check_var('BACKEND', 'svirt') and check_var('ARCH', 's390x')) {
# on svirt we need to redefine the xml-file to boot the installed kernel
loadtest "installation/redefine_svirt_domain";
}
if (is_sles4sap()) {
if (check_var('SLES4SAP_MODE', 'sles4sap_wizard')) {
loadtest "installation/sles4sap_wizard";
if (get_var("TREX")) {
loadtest "installation/sles4sap_wizard_trex";
}
if (get_var("NW")) {
loadtest "installation/sles4sap_wizard_nw";
}
loadtest "installation/sles4sap_wizard_swpm";
}
}
}
sub load_reboot_tests() {
# there is encryption passphrase prompt which is handled in installation/boot_encrypt
if (check_var("ARCH", "s390x") && !(get_var('ENCRYPT') && check_var('BACKEND', 'svirt'))) {
loadtest "installation/reconnect_s390";
}
if (uses_qa_net_hardware()) {
loadtest "boot/qa_net_boot_from_hdd";
}
if (installyaststep_is_applicable()) {
# test makes no sense on s390 because grub2 can't be captured
if (!(check_var("ARCH", "s390x") or (check_var('VIRSH_VMM_FAMILY', 'xen') and check_var('VIRSH_VMM_TYPE', 'linux')))) {
loadtest "installation/grub_test";
if ((snapper_is_applicable()) && get_var("BOOT_TO_SNAPSHOT")) {
loadtest "installation/boot_into_snapshot";
}
}
if (get_var('ENCRYPT')) {
loadtest "installation/boot_encrypt";
# reconnect after installation/boot_encrypt
if (check_var('BACKEND', 'svirt') && check_var('ARCH', 's390x')) {
loadtest "installation/reconnect_s390";
}
}
loadtest "installation/first_boot";
}
if (get_var("DUALBOOT")) {
loadtest "installation/reboot_eject_cd";
loadtest "installation/boot_windows";
}
}
sub load_consoletests() {
if (consolestep_is_applicable()) {
if (get_var("ADDONS", "") =~ /rt/) {
loadtest "rt/kmp_modules";
}
loadtest "console/consoletest_setup";
if (get_var("LOCK_PACKAGE")) {
loadtest "console/check_locked_package";
}
loadtest "console/textinfo";
loadtest "console/hostname";
if (get_var("SYSTEM_ROLE")) {
loadtest "console/patterns";
}
if (snapper_is_applicable()) {
if (get_var("UPGRADE")) {
loadtest "console/upgrade_snapshots";
}
elsif (!get_var("ZDUP") and !check_var('VERSION', '12')) { # zypper and sle12 doesn't do upgrade or installation snapshots
loadtest "console/installation_snapshots";
}
}
if (get_var("DESKTOP") !~ /textmode/ && !check_var("ARCH", "s390x")) {
loadtest "console/xorg_vt";
}
loadtest "console/zypper_lr";
loadtest "console/force_cron_run" unless is_jeos;
loadtest 'console/enable_usb_repo' if check_var('USBBOOT', 1);
if (need_clear_repos()) {
loadtest "update/zypper_clear_repos";
}
#have SCC repo for SLE product
if (have_scc_repos()) {
loadtest "console/yast_scc";
}
elsif (have_addn_repos()) {
loadtest "console/zypper_ar";
}
loadtest "console/zypper_ref";
loadtest "console/yast2_lan";
loadtest "console/curl_https";
if (check_var("ARCH", "x86_64")) {
loadtest "console/glibc_i686";
}
if (check_var('ARCH', 'aarch64')) {
loadtest "console/acpi";
}
if (!gnomestep_is_applicable()) {
loadtest "update/zypper_up";
}
if (is_jeos()) {
loadtest "console/console_reboot";
}
loadtest "console/zypper_in";
loadtest "console/yast2_i";
loadtest "console/yast2_bootloader";
loadtest "console/vim";
if (!is_staging()) {
loadtest "console/firewall_enabled";
}
if (is_jeos()) {
loadtest "console/gpt_ptable";
loadtest "console/kdump_disabled";
loadtest "console/sshd_running";
}
if (rt_is_applicable()) {
loadtest "console/rt_is_realtime";
loadtest "console/rt_devel_packages";
loadtest "console/rt_peak_pci";
loadtest "console/rt_preempt_test";
}
loadtest "console/sshd";
loadtest "console/ssh_cleanup";
loadtest "console/mtab";
if (is_new_installation && sle_version_at_least('12-SP2')) {
loadtest "console/no_perl_bootloader";
}
if (!get_var("NOINSTALL") && !is_desktop && (check_var("DESKTOP", "textmode"))) {
if (!is_staging() && check_var('BACKEND', 'qemu') && !is_jeos) {
# The NFS test expects the IP to be 10.0.2.15
loadtest "console/yast2_nfs_server";
}
loadtest "console/http_srv";
loadtest "console/mysql_srv";
loadtest "console/postgresql94server";
if (sle_version_at_least('12-SP1')) { # shibboleth-sp not available on SLES 12 GA
loadtest "console/shibboleth";
}
if (!is_staging()) {
# Very temporary removal of this test from staging - rbrown 6 Apr 2016
loadtest "console/dns_srv";
}
if (get_var('ADDONS', '') =~ /wsm/ || get_var('SCC_ADDONS', '') =~ /wsm/) {
loadtest "console/pcre";
loadtest "console/php5";
loadtest "console/php5_mysql";
loadtest "console/php5_postgresql94";
}
loadtest "console/apache_ssl";
loadtest "console/apache_nss";
}
if (check_var("DESKTOP", "xfce")) {
loadtest "console/xfce_gnome_deps";
}
if (check_var('ARCH', 'aarch64') and sle_version_at_least('12-SP2')) {
loadtest "console/check_gcc48_on_sdk_in_aarch64";
}
if (!is_staging() && sle_version_at_least('12-SP2')) {
loadtest "console/zypper_lifecycle";
}
loadtest "console/consoletest_finish";
}
}
sub load_x11tests() {
return
unless (!get_var("INSTALLONLY")
&& is_desktop_installed()
&& !get_var("DUALBOOT")
&& !get_var("RESCUECD")
&& !get_var("HACLUSTER"));
if (is_smt()) {
loadtest "x11/smt";
}
if (get_var("XDMUSED")) {
loadtest "x11/x11_login";
}
loadtest "x11/xterm";
loadtest "x11/sshxterm";
if (gnomestep_is_applicable()) {
loadtest "update/updates_packagekit_gpk";
loadtest "x11/gnome_control_center";
loadtest "x11/gnome_terminal";
loadtest "x11/gedit";
}
if (kdestep_is_applicable()) {
loadtest "x11/kate";
}
loadtest "x11/firefox";
if (!is_server() || we_is_applicable()) {
if (gnomestep_is_applicable()) {
loadtest "x11/eog";
loadtest "x11/rhythmbox";
loadtest "x11/wireshark";
loadtest "x11/ImageMagick";
loadtest "x11/ghostscript";
}
if (get_var('DESKTOP') =~ /kde|gnome/) {
loadtest "x11/ooffice";
loadtest "x11/oomath";
loadtest "x11/oocalc";
}
}
if (kdestep_is_applicable()) {
loadtest "x11/khelpcenter";
loadtest "x11/systemsettings";
loadtest "x11/dolphin";
}
if (snapper_is_applicable()) {
loadtest "x11/yast2_snapper";
}
loadtest "x11/glxgears";
if (kdestep_is_applicable()) {
loadtest "x11/amarok";
loadtest "x11/kontact";
loadtest "x11/reboot_kde";
}
if (gnomestep_is_applicable()) {
loadtest "x11/nautilus";
loadtest "x11/evolution" if (!is_server() || we_is_applicable());
loadtest "x11/reboot_gnome";
}
loadtest "x11/desktop_mainmenu";
# Need to skip shutdown to keep beckend alive if run rollback tests after migration
unless (get_var('ROLLBACK_AFTER_MIGRATION')) {
loadtest "x11/shutdown";
}
}
sub load_applicationstests {
if (my $val = get_var("APPTESTS")) {
for my $test (split(/,/, $val)) {
loadtest "$test";
}
return 1;
}
return 0;
}
sub load_slenkins_tests {
if (get_var("SLENKINS_CONTROL")) {
unless (get_var("SUPPORT_SERVER")) {
loadtest "slenkins/login";
loadtest "slenkins/slenkins_control_network";
}
loadtest "slenkins/slenkins_control";
return 1;
}
elsif (get_var("SLENKINS_NODE")) {
loadtest "slenkins/login";
loadtest "slenkins/slenkins_node";
return 1;
}
return 0;
}
sub load_hacluster_tests() {
return unless (get_var("HACLUSTER"));
sleep 10; # wait to make sure that support server created locks
barrier_wait("BARRIER_HA_" . get_var("CLUSTERNAME")); #nodes wait here
loadtest "installation/first_boot";
loadtest "console/consoletest_setup";
loadtest "console/hostname";
loadtest("ha/firewall_disable");
loadtest("ha/ntp_client");
loadtest("ha/iscsi_client");
loadtest("ha/watchdog");
if (get_var("HOSTNAME") eq 'host1') {
loadtest("ha/ha_cluster_init"); #node1 creates a cluster
}
else {
loadtest("ha/ha_cluster_join"); #node2 joins the cluster
}
if (get_var("CTS")) {
loadtest("ha/cts");
}
else {
loadtest("ha/dlm");
loadtest("ha/clvm");
loadtest("ha/ocfs2");
loadtest("ha/drbd");
loadtest("ha/crm_mon");
loadtest("ha/fencing");
if (!get_var("HACLUSTERJOIN")) { #node1 will be fenced
loadtest "ha/fencing_boot";
loadtest "ha/fencing_consoletest_setup";
}
}
loadtest("ha/check_logs"); #check_logs must be after ha/fencing
return 1;
}
sub load_virtualization_tests() {
# standalone suite to fit needed installation
if (get_var("STANDALONEVT")) {
loadtest "virtualization/boot";
loadtest "virtualization/installation";
loadtest "virtualization/prepare_sle12";
}
loadtest "virtualization/yast_virtualization";
loadtest "virtualization/virt_install";
loadtest "virtualization/virt_top";
loadtest "virtualization/virtman_install";
loadtest "virtualization/virtman_view";
loadtest "virtualization/virtman_storage";
loadtest "virtualization/virtman_virtualnet";
loadtest "virtualization/virtman_networkinterface";
loadtest "virtualization/virtman_create_guest";
}
sub load_feature_tests() {
loadtest "console/consoletest_setup";
loadtest "feature/feature_console/zypper_releasever";
loadtest "feature/feature_console/suseconnect";
loadtest "feature/feature_console/zypper_crit_sec_fix_only";
}
sub load_online_migration_tests() {
# stop packagekit service and more
loadtest "online_migration/sle12_online_migration/online_migration_setup";
loadtest "online_migration/sle12_online_migration/register_system";
loadtest "online_migration/sle12_online_migration/repos_check";
# do full/minimal update before migration
if (get_var("FULL_UPDATE")) {
loadtest "online_migration/sle12_online_migration/zypper_patch";
}
if (get_var("MINIMAL_UPDATE")) {
loadtest "online_migration/sle12_online_migration/minimal_patch";
}
loadtest "online_migration/sle12_online_migration/pre_migration";
if (get_var("LOCK_PACKAGE")) {
loadtest "console/lock_package";
}
if (check_var("MIGRATION_METHOD", 'yast')) {
loadtest "online_migration/sle12_online_migration/yast2_migration";
}
if (check_var("MIGRATION_METHOD", 'zypper')) {
loadtest "online_migration/sle12_online_migration/zypper_migration";
}
loadtest "online_migration/sle12_online_migration/post_migration";
}
sub load_fips_tests_core() {
loadtest "fips/openssl/openssl_fips_alglist";
loadtest "fips/openssl/openssl_fips_hash";
loadtest "fips/openssl/openssl_fips_cipher";
loadtest "fips/openssl/openssl_pubkey_rsa";
loadtest "fips/openssl/openssl_pubkey_dsa";
if (sle_version_at_least('12-SP2')) {
loadtest "console/openssl_alpn";
}
loadtest "console/sshd";
loadtest "console/ssh_pubkey";
loadtest "console/ssh_cleanup";
loadtest "fips/openssh/openssh_fips";
}
sub load_fips_tests_web() {
loadtest "console/curl_https";
loadtest "console/wget_https";
loadtest "console/w3m_https";
loadtest "console/apache_ssl";
loadtest "fips/mozilla_nss/apache_nssfips";
loadtest "console/libmicrohttpd";
loadtest "console/consoletest_finish";
loadtest "fips/mozilla_nss/firefox_nss";
}
sub load_fips_tests_misc() {
loadtest "console/aide_check";
loadtest "console/journald_fss";
loadtest "fips/curl_fips_rc4_seed";
loadtest "console/git";
loadtest "console/consoletest_finish";
loadtest "x11/hexchat_ssl";
}
sub load_fips_tests_crypt() {
loadtest "console/yast2_dm_crypt";
loadtest "console/cryptsetup";
loadtest "console/ecryptfs_fips";
}
sub load_patching_tests() {
if (check_var("ARCH", "s390x")) {
if (check_var('BACKEND', 's390x')) {
loadtest "installation/bootloader_s390";
}
else {
loadtest "installation/bootloader_zkvm";
}
}
if (get_var("OFW")) {
loadtest "installation/bootloader_ofw";
}
loadtest 'boot/boot_to_desktop_sym';
loadtest 'update/patch_before_migration';
loadtest 'console/consoletest_finish_sym';
loadtest 'x11/reboot_and_install';
}
sub prepare_target() {
if (get_var("BOOT_HDD_IMAGE")) {
boot_hdd_image;
}
else {
load_boot_tests();
load_inst_tests();
load_reboot_tests();
}
}
sub load_rollback_tests() {
loadtest "boot/grub_test_snapshot";
if (get_var('UPGRADE') || get_var('ZDUP')) {
loadtest "boot/snapper_rollback";
}
if (get_var('MIGRATION_ROLLBACK')) {
loadtest "online_migration/sle12_online_migration/snapper_rollback";
}
}
# load the tests in the right order
if (maybe_load_kernel_tests()) {
}
elsif (get_var("REGRESSION")) {
if (check_var("REGRESSION", "installation")) {