Advertisement
drpanwe

Untitled

Nov 6th, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. alfano:/var/lib/openqa/tests/kubic/products/kubic/:[0]# tree
  2. .
  3. |-- main.pm
  4. |-- needles -> ../opensuse/needles
  5. `-- testsuites
  6. |-- microos_10G.pm
  7. |-- microos.pm
  8. |-- microos_uefi.pm
  9. `-- rcshell.pm
  10.  
  11. 2 directories, 5 files
  12. alfano:/var/lib/openqa/tests/kubic/products/kubic/:[0]# less main.pm
  13. alfano:/var/lib/openqa/tests/kubic/products/kubic/:[0]#
  14. alfano:/var/lib/openqa/tests/kubic/products/kubic/:[0]# cat main.pm
  15. use strict;
  16. use warnings;
  17. use testapi qw(check_var get_var get_required_var set_var);
  18. use needle;
  19. use File::Basename;
  20. BEGIN {
  21. unshift @INC, dirname(__FILE__) . '/../../lib';
  22. unshift @INC, dirname(__FILE__) . '/testsuites';
  23. }
  24. use utils;
  25. use main_common;
  26.  
  27. # Kubic Testsuites
  28. use microos;
  29. use microos_uefi;
  30. use microos_10G;
  31. use rcshell;
  32.  
  33. init_main();
  34.  
  35. my $distri = testapi::get_required_var('CASEDIR') . '/lib/susedistribution.pm';
  36. require $distri;
  37. testapi::set_distribution(susedistribution->new());
  38. set_var 'FAIL_EXPECTED', 'SMALL-DISK' if get_var('HDDSIZEGB') < 12;
  39.  
  40. # Which jobgroup the testsuites belong
  41. sub jobgroup {
  42. my $filter = shift;
  43. return 1 unless $filter;
  44. if ($filter eq 'Tumbleweed kubic-dvd') {
  45. return ((check_var 'VERSION', 'Tumbleweed') && (check_var 'DISTRI', 'kubic') && (check_var 'FLAVOR', 'DVD'))
  46. }
  47. }
  48.  
  49. # When a testsuite should be triggered
  50. sub testsuite {
  51. my $filter = shift;
  52. return 1 unless $filter;
  53.  
  54. if ($filter eq 'rcshell') {
  55. return (check_var 'TEST', 'rcshell');
  56. }
  57.  
  58. if ($filter eq 'microos@64bit-4G-HD40G') {
  59. return ((check_var 'TEST', 'microos') && !(get_var 'UEFI'));
  60. }
  61.  
  62. if ($filter eq 'microos@uefi-4G-HD40G') {
  63. return ((check_var 'TEST', 'microos') && (check_var 'UEFI', '1'));
  64. }
  65.  
  66. if ($filter eq 'microos_10G-disk') {
  67. return (check_var 'TEST', 'microos_10G-disk');
  68. }
  69. }
  70.  
  71. if (jobgroup 'Tumbleweed kubic-dvd') {
  72. rcshell::run_tests if testsuite('rcshell');
  73. microos::run_tests if testsuite('microos@64bit-4G-HD40G');
  74. microos_uefi::run_tests if testsuite('microos@uefi-4G-HD40G');
  75. microos_10G::run_tests if testsuite('microos_10G-disk');
  76. }
  77.  
  78. 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement