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

Testcases failing on both on PPC64le and x86 VM #41

Open
ujwal-akare opened this issue Apr 27, 2023 · 4 comments
Open

Testcases failing on both on PPC64le and x86 VM #41

ujwal-akare opened this issue Apr 27, 2023 · 4 comments
Assignees

Comments

@ujwal-akare
Copy link

Testcases failing on both on PPC64le and x86 and getting following error for both.
Error: ERROR: Invocation
build-steps_Sign.txt
PPC64le_Sign_failures.txt
X86_Sign_Failures.txt
Error for command /ansible-sign/.tox/py3/bin/pytest --basetemp /tmp/ansible-sign-pytest --color=yes (exited with code 1)

Result: 12 failed, 17 passed, 11 errors

@relrod
Copy link
Member

relrod commented May 1, 2023

Hi, what OS and version are you doing this on?

@relrod
Copy link
Member

relrod commented May 1, 2023

I think this is an issue with dependency versions being out of sync.

Can you try doing this using the system package for python3 instead of building Python from source? I think you will have better luck.

For example, you're installing python 3.10 from the upstream, but then pulling in header files from the system python3 version (with python3-devel).

In fact, I don't actually see where you are using the upstream installed Python (I'm not sure what altinstall does, but tox's py3 env is going to use python3 and I don't see where you change that to point to your compiled Python). Same with pip3, if you do pip3 --version does it actually point to your compiled Python version?

@relrod relrod self-assigned this May 1, 2023
@ashwinik30
Copy link

hi @relrod ,
I have installed depdencies as per your suggestions and now all tests are passing

I am just getting this error

__________________________________________________________ ERROR at setup of test_pinentry_simple ___________________________________________________________

request = <SubRequest 'tmux_session' for <Function test_pinentry_simple>>

    @pytest.fixture
    def tmux_session(request):
        """
        Create a tmux session for testing
        """
>       session = libtmux.Server().new_session(
            session_name=f"ansible-sign_{request.node.name}",
            kill_session=True,
        )

tests/conftest.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.9/site-packages/libtmux/server.py:438: in new_session
    if self.has_session(session_name):
.tox/py3/lib/python3.9/site-packages/libtmux/server.py:269: in has_session
    if exact and has_gte_version("2.1"):
.tox/py3/lib/python3.9/site-packages/libtmux/common.py:362: in has_gte_version
    return get_version() >= LooseVersion(min_version)
.tox/py3/lib/python3.9/site-packages/libtmux/common.py:292: in get_version
    proc = tmux_cmd("-V")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <libtmux.common.tmux_cmd object at 0x7fff881f9ac0>, args = ('-V',), kwargs = {}, tmux_bin = None

    def __init__(self, *args: t.Any, **kwargs: t.Any) -> None:
        tmux_bin = shutil.which("tmux")
        if not tmux_bin:
>           raise exc.TmuxCommandNotFound()
E           libtmux.exc.TmuxCommandNotFound

.tox/py3/lib/python3.9/site-packages/libtmux/common.py:235: TmuxCommandNotFound

---------- coverage: platform linux, python 3.9.13-final-0 -----------
Name                                                   Stmts   Miss Branch BrPart  Cover   Missing
--------------------------------------------------------------------------------------------------
src/ansible_sign/__init__.py                               6      0      0      0   100%
src/ansible_sign/checksum/__init__.py                      2      0      0      0   100%
src/ansible_sign/checksum/base.py                         80      0     30      1    99%   165->171
src/ansible_sign/checksum/differ/__init__.py               1      0      0      0   100%
src/ansible_sign/checksum/differ/base.py                  28      2     12      1    92%   41, 61
src/ansible_sign/checksum/differ/distlib_manifest.py      25      0     10      0   100%
src/ansible_sign/cli.py                                  189     19     52     13    86%   172, 175->177, 180, 190, 202, 207-210, 241-242, 244->256, 251->253, 257, 305-306, 311-312, 336, 351-353, 374
src/ansible_sign/signing/__init__.py                       1      0      0      0   100%
src/ansible_sign/signing/base.py                          18      0      0      0   100%
src/ansible_sign/signing/gpg/__init__.py                   2      0      0      0   100%
src/ansible_sign/signing/gpg/signer.py                    26      0      8      1    97%   57->56
src/ansible_sign/signing/gpg/verifier.py                  33      3      8      3    85%   24, 28, 36
--------------------------------------------------------------------------------------------------
TOTAL                                                    411     24    120     19    92%

================================================================== short test summary info ==================================================================
ERROR tests/test_cli_pinentry.py::test_pinentry_simple - libtmux.exc.TmuxCommandNotFound
=============================================================== 39 passed, 1 error in 14.03s ================================================================
py3: exit 1 (14.56 seconds) /ansible-sign> pytest --basetemp /tmp/ansible-sign-pytest --color=yes pid=2147
.pkg: _exit> python /usr/local/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  py3: FAIL code 1 (22.03=setup[7.44]+cmd[0.02,0.00,14.56] seconds)
  evaluation failed :( (22.13 seconds)
[root@b72c07ce0581 ansible-sign]#

its related to E libtmux.exc.TmuxCommandNotFound

I have tried installing it ut its already in the path

@relrod
Copy link
Member

relrod commented May 24, 2023

We use libtmux for this particular test. As you can see, it's doing shutil.which("tmux"). So if it's in your shell path, in some way or another it's not making its way to the path that Python sees.

What happens if you import os; print(os.environ['PATH']) in a Python REPL?

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

No branches or pull requests

3 participants