File: test_manylinux_wheels.sh

package info (click to toggle)
pymssql 2.1.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 952 kB
  • sloc: python: 2,872; sh: 240; makefile: 148; ansic: 7
file content (37 lines) | stat: -rwxr-xr-x 1,290 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# Need to test the wheels that where build with build_manylinux_wheels.sh

# Rename test template file for CI
mv /io/tests/tests.cfg.tpl /io/tests/tests.cfg

# Setup xml results folder for CI if it does not exist
if [ ! -d /io/results ]; then
    mkdir /io/results
fi


# Install Python dependencies and compile wheels
for PYBIN in /opt/python/*/bin; do
    "${PYBIN}/pip" install pytest SQLAlchemy Sphinx sphinx-rtd-theme Cython wheel
done

# Install the wheels that were built. Need to be able to connect to mssql and to run the pytest suite after install
for PYBIN in /opt/python/*/bin/; do
    "${PYBIN}/pip" install pymssql --no-index -f /io/dist
    "${PYBIN}/python" -c "import pymssql; pymssql.__version__;"
    export TEST_PY="$(${PYBIN}/python -c 'import platform; major, minor, patch = platform.python_version_tuple(); print(major+minor+patch)')"
    "${PYBIN}pytest" /io --junitxml=/io/results/${TEST_PY}_test_results.xml
done


## Run SQL Alchemy Tests
#pushd /io
#for PYBIN in /opt/python/*/bin/; do
#    PYV=`python -c "import sys;t='{v[0]}'.format(v=list(sys.version_info[:1]));sys.stdout.write(t)";`
#    if [ $PYV == '2' ]; then
#        pip install mock
#    fi
#    "${PYBIN}/pip" install nose
#    "${PYBIN}python" tests/run_sqlalchemy_tests.py
#done
#popd