Project

General

Profile

action #60908

action #47894: [qe-core][functional] Continuous check for used/unused test modules within os-autoinst-distri-opensuse in the "functional" domain

[functional][u] Fix the detect_unused_modules and update to also check in the yaml schedule files

Added by szarate almost 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Refactor/Code Improvements
Target version:
SUSE QA - Milestone 30
Start date:
2019-12-11
Due date:
% Done:

0%

Estimated time:
42.00 h
Difficulty:
easy

Description

While we have this automated check for test modules that are in the test repository, since the YAML schedule files have been introduced, that check is becoming less and less useful, or rather we're losing some part of the view here.

It currently searches with git ls-files "*tests/*.pm" to find all the test modules, and then uses the filename to search with: git grep -qE "($t|load_testdir.*$t_dir)" And this is wrong, this means that if there's the mention to $t in any file, then the check passes.

A quick fix could be:

 - git grep -qE "($t|load_testdir.*$t_dir)" || echo $test
   # remove the -q from grep to see verbose output
 + git grep -qE "(loadtest.*$t|load_testdir.*$t_dir)" || echo $test 

But we also need to take into account the YAML Schedule, and that commented lines will not be taken into account.


Related issues

Copied to openQA Tests - action #62429: [functional][u] Fix test modules that are not in lib dir but are used as libraries / base classResolved2019-12-11

History

#1 Updated by szarate almost 2 years ago

  • Description updated (diff)

#2 Updated by szarate almost 2 years ago

  • Subject changed from [functional][u] update the detect_unused_modules to also check in the yaml schedule files to [functional][u] Fix the detect_unused_modules and update to also check in the yaml schedule files

#3 Updated by szarate almost 2 years ago

  • Estimated time set to 42.00 h

#4 Updated by dheidler almost 2 years ago

  • Status changed from Workable to In Progress
  • Assignee set to dheidler

#5 Updated by dheidler over 1 year ago

https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/9208

What shall we do with the unused modules?
Simply delete them?

 delete mode 100644 tests/console/acpi.pm
 delete mode 100644 tests/console/dovecot_ssl.pm
 delete mode 100644 tests/console/mariadb.pm
 delete mode 100644 tests/console/rootless.pm
 delete mode 100644 tests/console/skopeo.pm
 delete mode 100644 tests/console/umoci.pm
 delete mode 100644 tests/console/zypper_disable_deltarpm.pm
 delete mode 100644 tests/virt_autotest/proxymode_conn_slave.pm
 delete mode 100644 tests/virt_autotest/setup_console_on_host.pm
 delete mode 100644 tests/virtualization/virtman_storage.pm
 delete mode 100644 tests/virtualization/virtman_virtualnet.pm
 delete mode 100644 tests/x11/tomboy/tomboy_AlreadyRunning.pm
 delete mode 100644 tests/x11/tomboy/tomboy_Hotkeys.pm
 delete mode 100644 tests/x11/tomboy/tomboy_Print.pm
 delete mode 100644 tests/x11/tomboy/tomboy_TestFindFunctionalityInSearchAllNotes.pm
 delete mode 100644 tests/x11/tomboy/tomboy_TestUndoRedoFeature.pm

#6 Updated by okurz over 1 year ago

I think deleting them is just fine. After all we have them stored in git.

#7 Updated by dheidler over 1 year ago

  • Status changed from In Progress to Feedback

Well then let's wait on the PR

#8 Updated by mgriessmeier over 1 year ago

  • Target version changed from Milestone 28 to Milestone 30

dheidler wrote:

Well then let's wait on the PR

ack
moving to current Milestone

#9 Updated by dheidler over 1 year ago

  • Status changed from Feedback to Resolved

#10 Updated by dheidler over 1 year ago

  • Copied to action #62429: [functional][u] Fix test modules that are not in lib dir but are used as libraries / base class added

Also available in: Atom PDF