Revert "Allow running unit/functional tests against the salt checkout for now"

This reverts commit 7382aa187e.
This commit is contained in:
Pedro Algarvio 2023-05-08 11:34:33 +01:00 committed by Megan Wilhite
parent cbcbe14d47
commit e8d0e6a821

View file

@ -247,18 +247,18 @@ def pytest_configure(config):
called after command line options have been parsed
and all plugins and initial conftest files been loaded.
"""
# try:
# assert config._onedir_check_complete
# return
# except AttributeError:
# if os.environ.get("ONEDIR_TESTRUN", "0") == "1":
# if pathlib.Path(salt.__file__).parent == CODE_DIR / "salt":
# raise pytest.UsageError(
# "Apparently running the test suite against the onedir build "
# "of salt, however, the imported salt package is pointing to "
# "the respository checkout instead of the onedir package."
# )
# config._onedir_check_complete = True
try:
assert config._onedir_check_complete
return
except AttributeError:
if os.environ.get("ONEDIR_TESTRUN", "0") == "1":
if pathlib.Path(salt.__file__).parent == CODE_DIR / "salt":
raise pytest.UsageError(
"Apparently running the test suite against the onedir build "
"of salt, however, the imported salt package is pointing to "
"the respository checkout instead of the onedir package."
)
config._onedir_check_complete = True
for dirname in CODE_DIR.iterdir():
if not dirname.is_dir():