Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pygolang pygolang
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedi
  • pygolangpygolang
  • Merge requests
  • !11

Closed
Created Dec 09, 2020 by Kirill Smelkov@kirrOwner
  • Report abuse
Report abuse

gpython: tests: Skip test_pymain_run_via_relpath on SlapOS

  • Overview 4
  • Commits 1
  • Changes 1

Similarly to test_pymain_syspath we cannot run this test on SlapOS because with buildout raw underlying python interpreter does not have access to eggs with which gpython script was generated.

See 0fa9d6e7 and 92bb5bcc for details.

Without this patch running pygolang tests fails on SlapOS as shown below:

(pygolang-env) slapuser34@vifibcloud-rapidspace-hosting-007:~/srv/runner/software/44fe7dd3f13ecd100894c6368a35c055/parts/pygolang-dev$ gpython -m pytest -vsx -k relpath
================================================= test session starts ==================================================
platform linux2 -- Python 2.7.18, pytest-4.6.11, py-1.9.0, pluggy-0.13.1 -- /srv/slapgrid/slappart34/srv/runner/software/44fe7dd3f13ecd100894c6368a35c055/bin/gpython
cachedir: .pytest_cache
rootdir: /srv/slapgrid/slappart34/srv/runner/software/44fe7dd3f13ecd100894c6368a35c055/parts/pygolang-dev
collected 115 items / 114 deselected / 1 selected

gpython/gpython_test.py::test_pymain_run_via_relpath Traceback (most recent call last):
  File "./__init__.py", line 511, in <module>
    main()
  File "./__init__.py", line 395, in main
    pymain(argv, init)
  File "./__init__.py", line 217, in pymain
    init()
  File "./__init__.py", line 364, in init
    import gevent
ImportError: No module named gevent
FAILED

======================================================= FAILURES =======================================================
_____________________________________________ test_pymain_run_via_relpath ______________________________________________

    @gpython_only
    def test_pymain_run_via_relpath():
        argv = ['-c',  'import sys; print(sys.version)']
        out1 = pyout(                    argv, pyexe=sys.executable)
>       out2 = pyout(['./__init__.py'] + argv, pyexe=sys._gpy_underlying_executable, cwd=here)

gpython/gpython_test.py:301:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
golang/golang_test.py:1842: in pyout
    return pyrun(argv, stdin=stdin, stdout=stdout, stderr=stderr, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

argv = ['./__init__.py', '-c', 'import sys; print(sys.version)'], stdin = None, stdout = '', stderr = None
kw = {'cwd': '/srv/slapgrid/slappart34/srv/runner/software/44fe7dd3f13ecd100894c6368a35c055/parts/pygolang-dev/gpython', 'pyexe': '/srv/slapgrid/slappart34/srv//runner//shared/python2.7/44578f5389723084b136574c34bc8023/bin/python2.7'}
retcode = 1 

    def pyrun(argv, stdin=None, stdout=None, stderr=None, **kw):
        retcode, stdout, stderr = _pyrun(argv, stdin=stdin, stdout=stdout, stderr=stderr, **kw)
        if retcode:
>           raise RuntimeError(' '.join(argv) + '\n' + (stderr and str(stderr) or '(failed)'))
E           RuntimeError: ./__init__.py -c import sys; print(sys.version)
E           (failed)

golang/golang_test.py:1836: RuntimeError
======================================= 1 failed, 114 deselected in 0.73 seconds =======================================

Fixes 076cdd8f (gpython: Fix crash when invoked as e.g. ./bin/gpython).

Edited Dec 09, 2020 by Kirill Smelkov
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: y/slapos-gpython-relpath
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7