mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-23 07:34:35 -06:00
Moved the feature_tests folder into the regression folder.
This commit is contained in:
parent
71c962f51c
commit
1d0ac0f7dc
@ -58,7 +58,7 @@ class TestsGeneratorRegistry(ABCMeta):
|
||||
ABCMeta.__init__(self, name, bases, d)
|
||||
|
||||
@classmethod
|
||||
def load_generators(cls, pkg_root, exclude_pkgs, for_modules=[],
|
||||
def load_generators(cls, pkg_args, pkg_root, exclude_pkgs, for_modules=[],
|
||||
is_resql_only=False):
|
||||
|
||||
cls.registry = dict()
|
||||
@ -71,6 +71,12 @@ class TestsGeneratorRegistry(ABCMeta):
|
||||
# Append reverse engineered test case module
|
||||
all_modules.append('regression.re_sql.tests.test_resql')
|
||||
|
||||
if (pkg_args is None or pkg_args == "all") and \
|
||||
'feature_tests' not in exclude_pkgs:
|
||||
# Append feature tests module
|
||||
all_modules += find_modules(
|
||||
'regression.feature_tests', False, True)
|
||||
|
||||
# If specific modules are to be tested, exclude others
|
||||
# for modules are handled differently for resql
|
||||
if not is_resql_only and len(for_modules) > 0:
|
||||
|
@ -1427,8 +1427,8 @@ def get_parallel_sequential_module_list(module_list):
|
||||
# list of files consisting tests that needs to be
|
||||
# executed sequentially
|
||||
sequential_tests_file = [
|
||||
'pgadmin.feature_tests.pg_utilities_backup_restore_test',
|
||||
'pgadmin.feature_tests.pg_utilities_maintenance_test']
|
||||
'regression.feature_tests.pg_utilities_backup_restore_test',
|
||||
'regression.feature_tests.pg_utilities_maintenance_test']
|
||||
|
||||
# list of tests can be executed in parallel
|
||||
parallel_tests = list(module_list)
|
||||
|
@ -315,22 +315,28 @@ def load_modules(arguments, exclude_pkgs):
|
||||
"""
|
||||
from pgadmin.utils.route import TestsGeneratorRegistry
|
||||
# Load the test modules which are in given package(i.e. in arguments.pkg)
|
||||
for_modules = []
|
||||
if arguments['modules'] is not None:
|
||||
for_modules = arguments['modules'].split(',')
|
||||
|
||||
if arguments['pkg'] is None or arguments['pkg'] == "all":
|
||||
TestsGeneratorRegistry.load_generators('pgadmin', exclude_pkgs)
|
||||
TestsGeneratorRegistry.load_generators(arguments['pkg'],
|
||||
'pgadmin', exclude_pkgs)
|
||||
elif arguments['pkg'] is not None and arguments['pkg'] == "resql":
|
||||
for_modules = []
|
||||
if arguments['modules'] is not None:
|
||||
for_modules = arguments['modules'].split(',')
|
||||
|
||||
# Load the reverse engineering sql test module
|
||||
TestsGeneratorRegistry.load_generators('pgadmin', exclude_pkgs,
|
||||
TestsGeneratorRegistry.load_generators(arguments['pkg'],
|
||||
'pgadmin', exclude_pkgs,
|
||||
for_modules, is_resql_only=True)
|
||||
elif arguments['pkg'] is not None and arguments['pkg'] == "feature_tests":
|
||||
# Load the feature test module
|
||||
TestsGeneratorRegistry.load_generators(arguments['pkg'],
|
||||
'regression.%s' %
|
||||
arguments['pkg'],
|
||||
exclude_pkgs,
|
||||
for_modules)
|
||||
else:
|
||||
for_modules = []
|
||||
if arguments['modules'] is not None:
|
||||
for_modules = arguments['modules'].split(',')
|
||||
|
||||
TestsGeneratorRegistry.load_generators('pgadmin.%s' %
|
||||
TestsGeneratorRegistry.load_generators(arguments['pkg'],
|
||||
'pgadmin.%s' %
|
||||
arguments['pkg'],
|
||||
exclude_pkgs,
|
||||
for_modules)
|
||||
|
Loading…
Reference in New Issue
Block a user