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

allow the testsuite to run in the installed location #61950

Open
doko42 opened this issue Apr 16, 2013 · 7 comments
Open

allow the testsuite to run in the installed location #61950

doko42 opened this issue Apr 16, 2013 · 7 comments
Assignees
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@doko42
Copy link
Member

doko42 commented Apr 16, 2013

BPO 17750
Nosy @warsaw, @doko42, @pitrou, @ned-deily, @bitdancer
Dependencies
  • bpo-17046: test_subprocess test_executable_without_cwd fails when run with installed python
  • bpo-17746: test_shutil.TestWhich.test_non_matching_mode fails when running as root
  • bpo-17751: ctypes/test/test_macholib.py fails when run from the installed location
  • bpo-17752: many distutils tests fail when run from the installed location
  • bpo-17753: test_zipfile: requires write access to test and email.test
  • bpo-17754: test_ctypes assumes LANG=C LC_ALL=C
  • bpo-17755: test_builtin assumes LANG=C
  • bpo-17756: test_syntax_error fails when run in the installed location
  • bpo-17757: test_executable_without_cwd fails when run in the installed location
  • bpo-17758: test_site fails when the user does not have a home directory
  • bpo-17763: test_pydoc fails with the installed testsuite
  • bpo-17773: test_pydoc fails with the installed testsuite (2.7)
  • bpo-21264: test_compileall fails to build in the installed location
  • bpo-21266: test_zipfile fails to run in the installed location
  • bpo-22895: test failure introduced by the fix for issue python/issues-test-cpython#22462
  • bpo-25099: test_compileall fails when run by unprivileged user on installed Python
  • bpo-25101: test_zipfile failure when run by unprivileged user with installed Python
  • bpo-25109: test_code_module tests fail when run from the installed location
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/doko42'
    closed_at = None
    created_at = <Date 2013-04-16.10:39:40.642>
    labels = ['type-bug', 'tests']
    title = 'allow the testsuite to run in the installed location'
    updated_at = <Date 2019-02-24.22:40:16.119>
    user = 'https://github.com/doko42'

    bugs.python.org fields:

    activity = <Date 2019-02-24.22:40:16.119>
    actor = 'BreamoreBoy'
    assignee = 'doko'
    closed = False
    closed_date = None
    closer = None
    components = ['Tests']
    creation = <Date 2013-04-16.10:39:40.642>
    creator = 'doko'
    dependencies = ['17046', '17746', '17751', '17752', '17753', '17754', '17755', '17756', '17757', '17758', '17763', '17773', '21264', '21266', '22895', '25099', '25101', '25109']
    files = []
    hgrepos = []
    issue_num = 17750
    keywords = []
    message_count = 7.0
    messages = ['187066', '187090', '187104', '187106', '187124', '187125', '223253']
    nosy_count = 6.0
    nosy_names = ['barry', 'doko', 'pitrou', 'ned.deily', 'r.david.murray', 'jibel']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue17750'
    versions = ['Python 3.4', 'Python 3.5']

    @doko42
    Copy link
    Member Author

    doko42 commented Apr 16, 2013

    [Meta issue, opening separate issues for test cases]

    The default install always installs the testsuite together with all the python batteries. So make sure that you can run the testsuite can run from the installed location too.

    • some tests require the sources to run (using the srcdir macro,
      or files not installed, e.g. xxmodule.c).

    • some tests assume write permissions.

    • some tests assume not being run as root.

    @doko42 doko42 added the type-feature A feature request or enhancement label Apr 16, 2013
    @doko42 doko42 self-assigned this Apr 16, 2013
    @doko42 doko42 added the tests Tests in the Lib/test dir label Apr 16, 2013
    @bitdancer
    Copy link
    Member

    This has been fixed and broken again several times in the past[1]. We need a buildbot that runs the tests installed[2]. Antoine, do you have any thoughts about how to set up such a thing? I'm willing to host it.

    [1] I believe there used to be a program that ran the tests installed, from a cronjob on some dedicated machine somewhere. It also ran a -R run, I think, as well as being part of a job that built the docs. When the doc building strategy was changed, somewhere in the process of the transition to Python3 (the program was Python2 only, I believe), it seems to have been taken offline completely.

    [2] failing when run as root is a separate problem, and less practical to set a buildbot run for, though since my buildbots run in VMs, it is not completely out of the question.

    @bitdancer bitdancer added type-bug An unexpected behavior, bug, or error and removed type-feature A feature request or enhancement labels Apr 16, 2013
    @ned-deily
    Copy link
    Member

    We could change an existing buildbot, say one of the snakebite buildbots, to add a make install and run the tests from it. I don't think it should be very difficult. Just make sure ./configure --prefix= has a reasonable value like a dedicated directory (rather than /usr/local), avoid --enable-shared, rm -r on the prefix directories prior to the make install step, and cd to some clean directory (other than the source or build directories) then run the tests from `/bin/python -m test (or test.regrtest for 2.7) ...

    @bitdancer
    Copy link
    Member

    It occurs to me that the tricky bit is that the install directory contents should be (a) read-only (easy) and ideally (b) owned by root (a little trickier, but doable with a setuid script or tailored sudo command).

    @doko42
    Copy link
    Member Author

    doko42 commented Apr 16, 2013

    it doesn't have to be root, just another user as for running the testsuite.

    @bitdancer
    Copy link
    Member

    Right, it doesn't *have* to be root, but that would be the typical situation when the tests are run with Python installed. Having it be any other user still requires some privilege increase.

    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jul 16, 2014

    How do we stand with eight outstanding issues here?

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants