test_multibuild.sh 2.28 KB
Newer Older
1
# Test multibuild utilities
Ivan Pozdeev's avatar
Ivan Pozdeev committed
2
3
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
set -x
4
source common_utils.sh
5
6
7
8
9
10
# This is normally set
# - on linux via docker_build_wrap.sh, docker_test_wrap.sh
# - on macOS via make_workon_env or install_macpython,
#   which is called by get_macpython_environment which is called by before_install
# We call it here so that these pre-install tests succeed
PYTHON_EXE=python
11

12
source tests/utils.sh
13
source tests/test_common_utils.sh
14
source tests/test_fill_submodule.sh
Matthew Brett's avatar
Matthew Brett committed
15

16
17
18
# make sure it is set via one of the mechanisms above
unset PYTHON_EXE

Andrew Murray's avatar
Andrew Murray committed
19
if [ -n "$IS_MACOS" ]; then
20
    source osx_utils.sh
21
    MB_PYTHON_OSX_VER=${MB_PYTHON_OSX_VER:-$(macpython_sdk_for_version $MB_PYTHON_VERSION)}
22
    PLAT=${PLAT:-$(macpython_arch_for_version $MB_PYTHON_VERSION)}
23

robbuckley's avatar
robbuckley committed
24
25
26
27
28
    # exit early if this cmd is expected to fail (and does)
    if [[ -n $OSX_ENV_EXPECT_FAIL ]]; then
      expect_return 22 get_macpython_environment $MB_PYTHON_VERSION ${VENV:-""} $MB_PYTHON_OSX_VER
      exit 0
    fi
29
    get_macpython_environment $MB_PYTHON_VERSION ${VENV:-""} $MB_PYTHON_OSX_VER
robbuckley's avatar
robbuckley committed
30

31
32
    source tests/test_python_install.sh
    source tests/test_fill_pyver.sh
33
    source tests/test_fill_pypy_ver.sh
34
35
36
37
38
    source tests/test_osx_utils.sh
else
    source manylinux_utils.sh
    source tests/test_manylinux_utils.sh
fi
39
if [ -n "$TEST_BUILDS" ]; then
mattip's avatar
mattip committed
40
    MB_PYTHON_VERSION=${MB_PYTHON_VERSION:-3.7}
Andrew Murray's avatar
Andrew Murray committed
41
    if [ -n "$IS_MACOS" ]; then
42
43
44
        # This checked in test_library_builders.
        # Will be set automatically by docker call in build_multilinux below.
        PYTHON_VERSION=${MB_PYTHON_VERSION}
45
        source tests/test_library_builders.sh
mattip's avatar
mattip committed
46
        source tests/config.sh
47
48
    elif [ ! -x "$(command -v docker)" ]; then
        echo "Skipping build tests; no docker available"
49
50
51
    else
        touch config.sh
        source travis_linux_steps.sh
Matthew Brett's avatar
Matthew Brett committed
52
        my_plat=${PLAT:-x86_64}
53
54
        build_multilinux $my_plat "source tests/test_manylinux_utils_docker.sh"
        build_multilinux $my_plat "source tests/test_library_builders.sh"
mattip's avatar
mattip committed
55
        build_multilinux $my_plat "pip install simplejson"
mattip's avatar
mattip committed
56
        CONFIG_PATH=tests/config.sh
57
    fi
58
59
    build_index_wheel simplejson
    install_run $PLAT
60
fi
61

62
63
source tests/test_supported_wheels.sh

64
65
# Exit 1 if any test errors
barf
Ivan Pozdeev's avatar
Ivan Pozdeev committed
66
67
# Don't need Travis' machinery trace
set +x