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

Test installed rpm packages #196

Open
nirs opened this issue Mar 14, 2023 · 0 comments
Open

Test installed rpm packages #196

nirs opened this issue Mar 14, 2023 · 0 comments

Comments

@nirs
Copy link
Member

nirs commented Mar 14, 2023

Building rpms in centos-8 container in current master is broken, the scripts
are created with the wrong shebang:

# head -1 /usr/bin/ovirt-*
==> /usr/bin/ovirt-imageio <==
#!/usr/bin/python3.9 -s

==> /usr/bin/ovirt-imageioctl <==
#!/usr/bin/python3.9 -s

==> /usr/bin/ovirt-img <==
#!/usr/bin/python3.9 -s

This is wrong, since the scripts are installed by ovirt-imageio-daemon
and ovirt-imageio-client which uses python3.6.

If we install all the rpms

# ls dist/*.x86_64.rpm
dist/ovirt-imageio-client-2.4.9-0.202303141820.git88ec2f0.el8.x86_64.rpm
dist/ovirt-imageio-common-2.4.9-0.202303141820.git88ec2f0.el8.x86_64.rpm
dist/ovirt-imageio-common-debuginfo-2.4.9-0.202303141820.git88ec2f0.el8.x86_64.rpm
dist/ovirt-imageio-daemon-2.4.9-0.202303141820.git88ec2f0.el8.x86_64.rpm
dist/ovirt-imageio-debuginfo-2.4.9-0.202303141820.git88ec2f0.el8.x86_64.rpm
dist/ovirt-imageio-debugsource-2.4.9-0.202303141820.git88ec2f0.el8.x86_64.rpm
dist/python39-ovirt-imageio-client-2.4.9-0.202303141820.git88ec2f0.el8.x86_64.rpm
dist/python39-ovirt-imageio-common-2.4.9-0.202303141820.git88ec2f0.el8.x86_64.rpm
dist/python39-ovirt-imageio-common-debuginfo-2.4.9-0.202303141820.git88ec2f0.el8.x86_64.rpm

This issue is hidden, since running ovirt-img
will run python3.9 and load ovirt_imageio package from /usr/lib64/python3.9/site-packages
but if we install only ovirt-imageio-client, ovirt-img will fail
to find the ovirt_imageio package in /usr/lib64/python3.9/site-packages

The issue is fixed by #194 but it should be tested by the test suite.

We need to add these tests:

  1. Only platform python
  • dnf remove ovirt-imageio-* python39-ovirt-imageio-*
  • install ovirt-imageio-client and ovirt-imageio-daemon
  • test that ovirt-img -h, ovirt-imageio -h and ovirt-imageioctl -h
  1. Only non-platform python
  • dnf remove ovirt-imageio-* python39-ovirt-imageio-*
  • install pythonXY-ovirt-imageio-client
  • test that we can import the ovirt_imageio package using pythonX.Y
    # (cd /tmp && python3.9 -c 'import ovirt_imageio')
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'ovirt_imageio'
    
  1. Install both platform and non-platform python packages
    • Same tests, to make sure installing both packages does not break anything

These tests should run as part of CI but not locally.

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

1 participant