test_osx_utils.sh 3.58 KB
Newer Older
1
2
3
4
5
6
7
8
# Tests for OSX utils

# Test extension for downloaded Python.org installer
[ "$(pyinst_ext_for_version 2.7.8)" == dmg ] || ingest
[ "$(pyinst_ext_for_version 2.7.9)" == pkg ] || ingest
[ "$(pyinst_ext_for_version 2.7)" == pkg ] || ingest
[ "$(pyinst_ext_for_version 2)" == pkg ] || ingest
[ "$(pyinst_ext_for_version 3.5.0)" == pkg ] || ingest
Andrew Murray's avatar
Andrew Murray committed
9
[ "$(pyinst_ext_for_version 3.5)" == pkg ] || ingest
10
[ "$(pyinst_ext_for_version 3)" == pkg ] || ingest
11

12
13
14
15
16
17
18
19
20
21
[ "$(pyinst_fname_for_version 2.7.14)" == "python-2.7.14-macosx10.6.pkg" ] || ingest
[ "$(pyinst_fname_for_version 2.7.15)" == "python-2.7.15-macosx10.9.pkg" ] || ingest
[ "$(pyinst_fname_for_version 3.6.8)" == "python-3.6.8-macosx10.9.pkg" ] || ingest
[ "$(pyinst_fname_for_version 3.7.1)" == "python-3.7.1-macosx10.9.pkg" ] || ingest
[ "$(pyinst_fname_for_version 3.8.0)" == "python-3.8.0-macosx10.9.pkg" ] || ingest

[ "$(pyinst_fname_for_version 2.7.14 10.6)" == "python-2.7.14-macosx10.6.pkg" ] || ingest
[ "$(pyinst_fname_for_version 2.7.15 10.6)" == "python-2.7.15-macosx10.6.pkg" ] || ingest
[ "$(pyinst_fname_for_version 3.6.8 10.6)" == "python-3.6.8-macosx10.6.pkg" ] || ingest
[ "$(pyinst_fname_for_version 3.7.1 10.6)" == "python-3.7.1-macosx10.6.pkg" ] || ingest
22

23
24
[ "$(pyinst_fname_for_version 2.7.15 10.11)" == "python-2.7.15-macosx10.11.pkg" ] || ingest
[ "$(pyinst_fname_for_version 3.7.1 10.12)" == "python-3.7.1-macosx10.12.pkg" ] || ingest
25
26

# Test utilities for getting Python version versions
Kyle Stewart's avatar
Kyle Stewart committed
27
28
[ "$(get_py_digit)" == "${cpython_version:0:1}" ] || ingest
[ "$(get_py_mm)" == "${cpython_version:0:3}" ] || ingest
29
30
[ "$(get_py_mm_nodot)" == $(echo "${cpython_version:0:3}" | tr -d .) ] || ingest

31
# test lookup of arch from Python macOS target build
32
33
34
[ "$(macpython_arch_for_version 2.7 10.6)" == "intel" ] || ingest
[ "$(macpython_arch_for_version 2.7 10.9)" == "x86_64" ] || ingest
[ "$(macpython_arch_for_version pypy-2.7)" == "x86_64" ] || ingest
35

Andrew Murray's avatar
Andrew Murray committed
36
# test lookup of arch / min macOS versions from installed Python distutils tag
37
38
39
[ "$(get_macpython_arch macosx-10.6-intel)" == "intel" ] || ingest
[ "$(get_macpython_arch macosx-10.6-x86_64)" == "x86_64" ] || ingest
[ "$(get_macpython_osx_ver macosx-10.6-intel)" == "10.6" ] || ingest
40

41
42
43
44
45
46
# test utilities for extracting version and impl from Python version string
[ "$(strip_macpython_ver_prefix 3.7.2)" == "3.7.2" ] || ingest
[ "$(strip_macpython_ver_prefix pypy-5.4)" == "5.4" ] || ingest
[ "$(macpython_impl_for_version 3.7.2)" == "cp" ] || ingest
[ "$(macpython_impl_for_version pypy-5.4)" == "pp" ] || ingest

47
48
49
50
51
52
53
# Test lookup of available macOS SDK build targets from python version
[ "$(macpython_sdk_list_for_version 3.8)"    == "10.9" ] || ingest
[ "$(macpython_sdk_list_for_version 3.7.5)"  == "10.6 10.9" ] || ingest
[ "$(macpython_sdk_list_for_version 3.7)"    == "10.6 10.9" ] || ingest
[ "$(macpython_sdk_list_for_version 3.6.5)"  == "10.6 10.9" ] || ingest
[ "$(macpython_sdk_list_for_version 3.6)"    == "10.6 10.9" ] || ingest
[ "$(macpython_sdk_list_for_version 3.5)"    == "10.6" ] || ingest
robbuckley's avatar
robbuckley committed
54
[ "$(macpython_sdk_list_for_version 2.7)"    == "10.9" ] || ingest
55
56
[ "$(macpython_sdk_list_for_version 2.7.14)" == "10.6" ] || ingest
[ "$(macpython_sdk_list_for_version 2.7.15)" == "10.6 10.9" ] || ingest
robbuckley's avatar
robbuckley committed
57
58
[ "$(macpython_sdk_list_for_version 2.7.17)" == "10.6 10.9" ] || ingest
[ "$(macpython_sdk_list_for_version 2.7.18)" == "10.9" ] || ingest
59
60
61
62
63
64

[ "$(macpython_sdk_for_version 3.8)"    == "10.9" ] || ingest
[ "$(macpython_sdk_for_version 3.5)"    == "10.6" ] || ingest
[ "$(macpython_sdk_for_version 2.7)"    == "10.9" ] || ingest
[ "$(macpython_sdk_for_version 2.7.14)" == "10.6" ] || ingest

65
# Test pkg-config install
Andrew Murray's avatar
Andrew Murray committed
66
install_pkg_config