Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find configuration file while running tests on ppc64le #1464

Open
ashwinik30 opened this issue May 16, 2023 · 1 comment
Open

Unable to find configuration file while running tests on ppc64le #1464

ashwinik30 opened this issue May 16, 2023 · 1 comment

Comments

@ashwinik30
Copy link

ashwinik30 commented May 16, 2023

Version

Describe the bug

Trying to run unit/functional tests on power (ppc64le arch).

To Reproduce
Steps to reproduce the behavior:
run command pytest --pyargs pulp_ansible.tests.functional

Expected behavior
A clear and concise description of what you expected to happen.
It should run tests for power

Additional context
Add any other context about the problem here. Please provide links to any previous discussions via Discourse or Bugzilla.
Steps done

  1. git clone https://github.com/pulp/pulp_ansible
  2. yum install java-17-openjdk-devel openssl-devel git wget tar python39-devel.ppc64le gcc rust cargo gcc-c++ cmake.ppc64le -y
  3. pip3 install -r test_requirements.txt
  4. pytest --pyargs pulp_ansible.tests.functional
Traceback (most recent call last):
  File "/usr/local/bin/pytest", line 8, in <module>
    sys.exit(console_main())
  File "/usr/local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 189, in console_main
    code = main()
  File "/usr/local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 147, in main
    config = _prepareconfig(args, plugins)
  File "/usr/local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 328, in _prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
  File "/usr/local/lib/python3.9/site-packages/pluggy/_hooks.py", line 265, in __call__
    return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
  File "/usr/local/lib/python3.9/site-packages/pluggy/_manager.py", line 80, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 55, in _multicall
    gen.send(outcome)
  File "/usr/local/lib/python3.9/site-packages/_pytest/helpconfig.py", line 103, in pytest_cmdline_parse
    config: Config = outcome.get_result()
  File "/usr/local/lib/python3.9/site-packages/pluggy/_result.py", line 60, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 39, in _multicall
    res = hook_impl.function(*args)
  File "/usr/local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1067, in pytest_cmdline_parse
    self.parse(args)
  File "/usr/local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1354, in parse
    self._preparse(args, addopts=addopts)
  File "/usr/local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1237, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "/usr/local/lib/python3.9/site-packages/pluggy/_manager.py", line 287, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/usr/lib64/python3.9/importlib/metadata.py", line 86, in load
    module = import_module(match.group('module'))
  File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/usr/local/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 172, in exec_module
    exec(co, module.__dict__)
  File "/usr/local/lib/python3.9/site-packages/pulp_smash/pulp3/pytest_plugin/__init__.py", line 20, in <module>
    from pulp_smash.pulp3.bindings import monitor_task
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/usr/local/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 172, in exec_module
    exec(co, module.__dict__)
  File "/usr/local/lib/python3.9/site-packages/pulp_smash/pulp3/bindings.py", line 15, in <module>
    cfg = get_config()
  File "/usr/local/lib/python3.9/site-packages/pulp_smash/config.py", line 242, in get_config
    _CONFIG = PulpSmashConfig.load()
  File "/usr/local/lib/python3.9/site-packages/pulp_smash/config.py", line 553, in load
    path = cls.get_load_path(xdg_subdir, config_file)
  File "/usr/local/lib/python3.9/site-packages/pulp_smash/config.py", line 616, in get_load_path
    raise exceptions.ConfigFileNotFoundError(
pulp_smash.exceptions.ConfigFileNotFoundError: /root/.config/pulp_smash/settings.jsonPulp Smash is unable to find a configuration file. The following (XDG compliant) paths have been searched: , /etc/xdg/pulp_smash/settings.json
[root@574ce588ed16 pulp_ansible]#
[root@574ce588ed16 pulp_ansible]# pytest
Traceback (most recent call last):
  File "/usr/local/bin/pytest", line 8, in <module>
    sys.exit(console_main())
  File "/usr/local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 189, in console_main
    code = main()
  File "/usr/local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 147, in main
    config = _prepareconfig(args, plugins)
  File "/usr/local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 328, in _prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
  File "/usr/local/lib/python3.9/site-packages/pluggy/_hooks.py", line 265, in __call__
    return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
  File "/usr/local/lib/python3.9/site-packages/pluggy/_manager.py", line 80, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 55, in _multicall
    gen.send(outcome)
  File "/usr/local/lib/python3.9/site-packages/_pytest/helpconfig.py", line 103, in pytest_cmdline_parse
    config: Config = outcome.get_result()
  File "/usr/local/lib/python3.9/site-packages/pluggy/_result.py", line 60, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 39, in _multicall
    res = hook_impl.function(*args)
  File "/usr/local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1067, in pytest_cmdline_parse
    self.parse(args)
  File "/usr/local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1354, in parse
    self._preparse(args, addopts=addopts)
  File "/usr/local/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1237, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "/usr/local/lib/python3.9/site-packages/pluggy/_manager.py", line 287, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/usr/lib64/python3.9/importlib/metadata.py", line 86, in load
    module = import_module(match.group('module'))
  File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/usr/local/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 172, in exec_module
    exec(co, module.__dict__)
  File "/usr/local/lib/python3.9/site-packages/pulp_smash/pulp3/pytest_plugin/__init__.py", line 20, in <module>
    from pulp_smash.pulp3.bindings import monitor_task
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/usr/local/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 172, in exec_module
    exec(co, module.__dict__)
  File "/usr/local/lib/python3.9/site-packages/pulp_smash/pulp3/bindings.py", line 15, in <module>
    cfg = get_config()
  File "/usr/local/lib/python3.9/site-packages/pulp_smash/config.py", line 242, in get_config
    _CONFIG = PulpSmashConfig.load()
  File "/usr/local/lib/python3.9/site-packages/pulp_smash/config.py", line 553, in load
    path = cls.get_load_path(xdg_subdir, config_file)
  File "/usr/local/lib/python3.9/site-packages/pulp_smash/config.py", line 616, in get_load_path
    raise exceptions.ConfigFileNotFoundError(
pulp_smash.exceptions.ConfigFileNotFoundError: /root/.config/pulp_smash/settings.jsonPulp Smash is unable to find a configuration file. The following (XDG compliant) paths have been searched: , /etc/xdg/pulp_smash/settings.json
[root@574ce588ed16 pulp_ansible]#
@ashwinik30
Copy link
Author

Created setting.json file
Still facing issue :

/usr/local/lib/python3.9/site-packages/pulp_smash/cli.py:128: in check_returncode
raise exceptions.CalledProcessError(
E pulp_smash.exceptions.CalledProcessError: Command ('/usr/local/bin/pulpcore-manager', 'shell', '-c', "import json; from django.conf import settings;cfg_value = getattr(settings,'V3_API_ROOT', None);value = cfg_value if not isinstance(cfg_value, set) else list(cfg_value);print(json.dumps(value))") returned non-zero exit status 127.
E
E stdout:
E
E stderr: bash: /usr/local/bin/pulpcore-manager: No such file or directory
================================================================== short test summary info ==================================================================
ERROR - pulp_smash.exceptions.CalledProcessError: Command ('/usr/local/bin/pulpcore-manager', 'shell', '-c', "import json; from django.conf import settings;cfg_...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================== 1 error in 12.96s =====================================================================
[root@ibm-p9z-27-lp26 pulp_ansible]#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant