Navigation Menu

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

android: test_distutils fails #71118

Closed
xdegaye mannequin opened this issue May 3, 2016 · 7 comments
Closed

android: test_distutils fails #71118

xdegaye mannequin opened this issue May 3, 2016 · 7 comments
Assignees
Labels
3.7 (EOL) end of life tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@xdegaye
Copy link
Mannequin

xdegaye mannequin commented May 3, 2016

BPO 26931
Nosy @merwok, @xdegaye, @dstufft, @moreati
Files
  • test_output.txt: test results
  • cross-compiled-skip.patch: skip some tests when interpreter was cross-compiled
  • android-sh-path.patch: use /system/bin/sh on android
  • android-sh-path_2.patch
  • cross-compiled-skip_2.patch
  • 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/xdegaye'
    closed_at = <Date 2016-11-17.10:20:45.408>
    created_at = <Date 2016-05-03.14:25:01.413>
    labels = ['3.7', 'type-bug', 'tests']
    title = 'android: test_distutils fails'
    updated_at = <Date 2016-11-17.10:20:45.408>
    user = 'https://github.com/xdegaye'

    bugs.python.org fields:

    activity = <Date 2016-11-17.10:20:45.408>
    actor = 'xdegaye'
    assignee = 'xdegaye'
    closed = True
    closed_date = <Date 2016-11-17.10:20:45.408>
    closer = 'xdegaye'
    components = ['Tests']
    creation = <Date 2016-05-03.14:25:01.413>
    creator = 'xdegaye'
    dependencies = []
    files = ['42698', '42744', '42745', '42915', '45346']
    hgrepos = []
    issue_num = 26931
    keywords = ['patch']
    message_count = 7.0
    messages = ['264732', '264944', '264945', '264946', '265924', '280043', '281025']
    nosy_count = 5.0
    nosy_names = ['eric.araujo', 'xdegaye', 'python-dev', 'dstufft', 'Alex.Willmer']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue26931'
    versions = ['Python 3.6', 'Python 3.7']

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented May 3, 2016

    test_distutils fails on an android emulator running an x86 system image at API level 21.

    See the attached test_output.txt file.

    Some of these failed tests could be skipped, supposing that native compilation of extension modules on android itself (as opposed to using cross-compilation) is not supported.

    @xdegaye xdegaye mannequin added stdlib Python modules in the Lib dir build The build process and cross-build type-bug An unexpected behavior, bug, or error labels May 3, 2016
    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented May 6, 2016

    The last two failed tests:
    test_sysconfig_compiler_vars
    test_sysconfig_module

    are caused by LDFLAGS being set in the environment both when configure is run and when make is run.

    Removing LDFLAGS from the environment when running make fixes these tests.

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented May 6, 2016

    The attached patch skips some tests when the interpreter was cross-compiled. When the interpreter has been cross-compiled, there is probably no compiler on the host system.

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented May 6, 2016

    On android, the shell path is /system/bin/sh. The attached patch fixes this, assuming that there is a platform.android_ver() as per issue bpo-26855: add platform.android_ver() for android. This could be changed for a test on sys.platform if there was a specific sys.platform value for android.

    With both patches and the LDFLAGS change on the cross-build system, test_distutils runs fine.

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented May 20, 2016

    This new patch adds a dependency to issue bpo-27027.

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Nov 4, 2016

    The problem raised in msg264946 has been fixed at changeset 15835311b5e6.

    This new cross-compiled-skip_2.patch is not specific to Android and fixes test_distutils when the executables used to build the interpreter do not exist on the platform
    where the test is run. The patch also does:

    • Fix a bug in test_run of Lib/distutils/tests/test_build_clib.py that was using the values of the 'compiler.executables' dictionary instead of the attributes of 'compiler'.
    • Removes test_get_python_inc from test_sysconfig.py as Python.h may not be installed on systems where extension modules are not expected to be built (BTW the comment in the test
      points out: "This is not much of a test" :).

    With this patch, test_distutils runs fine on the Android emulator.

    @xdegaye xdegaye mannequin added tests Tests in the Lib/test dir 3.7 (EOL) end of life and removed stdlib Python modules in the Lib dir build The build process and cross-build labels Nov 4, 2016
    @xdegaye xdegaye mannequin self-assigned this Nov 16, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 17, 2016

    New changeset cea3b621973f by Xavier de Gaye in branch '3.6':
    bpo-26931: Skip the test_distutils tests using a compiler executable
    https://hg.python.org/cpython/rev/cea3b621973f

    New changeset 99d69fd1b24e by Xavier de Gaye in branch 'default':
    bpo-26931: Merge 3.6
    https://hg.python.org/cpython/rev/99d69fd1b24e

    @xdegaye xdegaye mannequin closed this as completed Nov 17, 2016
    @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
    3.7 (EOL) end of life tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants