<commit_before>#!/bin/bash
# This script is meant to be called by the "script" step defined in
# .travis.yml. See http://docs.travis-ci.com/ for more details.
# The behavior of the script is controlled by environment variables defined
# in the .travis.yml in the top level folder of the project.

set -e

python --version
python -c "import numpy; print('numpy %s' % numpy.__version__)"
python -c "import scipy; print('scipy %s' % scipy.__version__)"

if [[ "$USE_OPENMP" == "True" ]]; then
    CFLAGS="-fopenmp" LDFLAGS="-lgomp" python setup.py install
    export OMP_NUM_THREADS=4
else
    python setup.py install
fi

python -c "import cvxpy; print(cvxpy.installed_solvers())"
python $(dirname ${BASH_SOURCE[0]})/../osqp_version.py

if [[ "$COVERAGE" == "true" ]]; then
    export WITH_COVERAGE="--with-coverage"
else
    export WITH_COVERAGE=""
fi

pytest $WITH_COVERAGE cvxpy/tests
pytest $WITH_COVERAGE cvxpy/performance_tests<commit_msg>try a different linker flag for openmp on macOS ...<commit_after>#!/bin/bash
# This script is meant to be called by the "script" step defined in
# .travis.yml. See http://docs.travis-ci.com/ for more details.
# The behavior of the script is controlled by environment variables defined
# in the .travis.yml in the top level folder of the project.

set -e

python --version
python -c "import numpy; print('numpy %s' % numpy.__version__)"
python -c "import scipy; print('scipy %s' % scipy.__version__)"

if [ $USE_OPENMP == "True" ] && [ $TRAVIS_OS_NAME == "linux" ]; then
    CFLAGS="-fopenmp" LDFLAGS="-lgomp" python setup.py install
    export OMP_NUM_THREADS=4
if [ $USE_OPENMP == "True" ] && [ $TRAVIS_OS_NAME == "osx" ]; then
    CFLAGS="-fopenmp" LDFLAGS="-lomp" python setup.py install
    export OMP_NUM_THREADS=4
else
    python setup.py install
fi

python -c "import cvxpy; print(cvxpy.installed_solvers())"
python $(dirname ${BASH_SOURCE[0]})/../osqp_version.py

if [[ "$COVERAGE" == "true" ]]; then
    export WITH_COVERAGE="--with-coverage"
else
    export WITH_COVERAGE=""
fi

pytest $WITH_COVERAGE cvxpy/tests
pytest $WITH_COVERAGE cvxpy/performance_tests
{'fraction_non_alphanumeric': 0.13222748815165877, 'fraction_numerical': 0.002369668246445498, 'mean_word_length': 4.2775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2391766', 'n_tokens_mistral': 745, 'n_tokens_neox': 736, 'n_words': 223}