Advertisement
drpanwe

Untitled

Nov 6th, 2018
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 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.  
  12.  
  13.  
  14. The triggering from main.pm looks like this:
  15.  
  16. if (jobgroup 'Tumbleweed kubic-dvd') {
  17. microos::run_tests if testsuite('microos@64bit-4G-HD40G');
  18. microos_uefi::run_tests if testsuite('microos@uefi-4G-HD40G');
  19. microos_10G::run_tests if testsuite('microos_10G-disk');
  20. rcshell::run_tests if testsuite('rcshell');
  21. }
  22.  
  23.  
  24. The testsuite strings are the same ones used in web-UI (e.g. https://openqa.opensuse.org/tests/overview?distri=kubic&distri=opensuse&version=Tumbleweed&build=20181105&groupid=1)
  25.  
  26.  
  27.  
  28. Adding a new testsuite:
  29.  
  30. WebUI
  31. 1. Go to webui and add a new testsuite.
  32. 2. Go to webui and add it to Tumbleweed Kubic-dvd jobgroup
  33.  
  34. Code
  35. 1. Create a new file with the name of the testsuite (e.g. /var/lib/openqa/tests/kubic/products/kubic/testsuites/mytestsuite.pm) and load your tests there under the 'run_test' subroutine.
  36.  
  37. 2. Include this file to main.pm (mytestsuite.pm)
  38.  
  39. 3. At the 'testsuite' subroutine define 'when' you want this to get triggered
  40.  
  41. 4. Finally trigger it under the correct jobgroup
  42. e.g. mytestsuite::run_tests if testsuite('mytestsuite');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement