Commit 2bb607c8 authored by Ivan Pozdeev's avatar Ivan Pozdeev Committed by Matthew Brett
Browse files

Wrapper to catch yum package not found; tests to be run in docker

parent fd9ae17d
...@@ -152,7 +152,7 @@ function untar { ...@@ -152,7 +152,7 @@ function untar {
function install_rsync { function install_rsync {
if [ -z "$IS_OSX" ]; then if [ -z "$IS_OSX" ]; then
[[ $(type -P rsync) ]] || yum install -y rsync [[ $(type -P rsync) ]] || yum_install rsync
fi fi
} }
......
...@@ -110,7 +110,7 @@ function build_zlib { ...@@ -110,7 +110,7 @@ function build_zlib {
# Gives an old but safe version # Gives an old but safe version
if [ -n "$IS_OSX" ]; then return; fi # OSX has zlib already if [ -n "$IS_OSX" ]; then return; fi # OSX has zlib already
if [ -e zlib-stamp ]; then return; fi if [ -e zlib-stamp ]; then return; fi
yum install -y zlib-devel yum_install zlib-devel
touch zlib-stamp touch zlib-stamp
} }
...@@ -157,7 +157,7 @@ function get_cmake { ...@@ -157,7 +157,7 @@ function get_cmake {
if [ -n "$IS_OSX" ]; then if [ -n "$IS_OSX" ]; then
brew install cmake > /dev/null brew install cmake > /dev/null
else else
yum install -y cmake28 > /dev/null yum_install cmake28 > /dev/null
cmake=cmake28 cmake=cmake28
fi fi
echo $cmake echo $cmake
...@@ -360,7 +360,7 @@ function build_suitesparse { ...@@ -360,7 +360,7 @@ function build_suitesparse {
if [ -n "$IS_OSX" ]; then if [ -n "$IS_OSX" ]; then
brew install suite-sparse > /dev/null brew install suite-sparse > /dev/null
else else
yum install -y suitesparse-devel > /dev/null yum_install suitesparse-devel > /dev/null
fi fi
touch suitesparse-stamp touch suitesparse-stamp
} }
......
...@@ -62,7 +62,7 @@ function activate_ccache { ...@@ -62,7 +62,7 @@ function activate_ccache {
ln -s /parent-home/.ccache $HOME/.ccache ln -s /parent-home/.ccache $HOME/.ccache
# Now install ccache # Now install ccache
suppress yum install -y ccache suppress yum_install ccache
# Create fake compilers and prepend them to the PATH # Create fake compilers and prepend them to the PATH
# Note that yum is supposed to create these for us, # Note that yum is supposed to create these for us,
...@@ -78,3 +78,8 @@ function activate_ccache { ...@@ -78,3 +78,8 @@ function activate_ccache {
# Prove to the developer that ccache is activated # Prove to the developer that ccache is activated
echo "Using C compiler: $(which gcc)" echo "Using C compiler: $(which gcc)"
} }
function yum_install {
# CentOS 5 yum doesn't fail in some cases, e.g. if package is not found
# https://serverfault.com/questions/694942/yum-should-error-when-a-package-is-not-available
yum install -y "$1" && rpm -q "$1"
}
# Tests for manylinux utils # Tests for manylinux utils that can run outside docker
# CPython path calculator # CPython path calculator
[ "$(cpython_path 2.7)" == "/opt/python/cp27-cp27mu" ] || ingest "cp 2.7" [ "$(cpython_path 2.7)" == "/opt/python/cp27-cp27mu" ] || ingest "cp 2.7"
......
# Tests for manylinux utils that must run inside docker
source manylinux_utils.sh
source tests/utils.sh
suppress yum_install rsync && suppress yum erase -y rsync \
|| ingest "yum_install valid"
suppress bash -c '! yum_install nonexistent' || ingest "yum_install nonexistent"
barf
\ No newline at end of file
...@@ -36,7 +36,10 @@ if [ -n "$TEST_BUILDS" ]; then ...@@ -36,7 +36,10 @@ if [ -n "$TEST_BUILDS" ]; then
touch config.sh touch config.sh
source travis_linux_steps.sh source travis_linux_steps.sh
my_plat=${PLAT:-x86_64} my_plat=${PLAT:-x86_64}
build_multilinux $my_plat "source tests/test_library_builders.sh" build_multilinux $my_plat "
source tests/test_manylinux_utils_docker.sh
source tests/test_library_builders.sh
"
fi fi
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment