diff --git a/test/runner/completion/remote.txt b/test/runner/completion/remote.txt index 955271c99b..79deb0c045 100644 --- a/test/runner/completion/remote.txt +++ b/test/runner/completion/remote.txt @@ -1,3 +1,4 @@ freebsd/11.1 osx/10.11 rhel/7.6 +rhel/8.0 diff --git a/test/runner/setup/remote.sh b/test/runner/setup/remote.sh index a23c164be0..6100c16914 100644 --- a/test/runner/setup/remote.sh +++ b/test/runner/setup/remote.sh @@ -27,19 +27,47 @@ if [ "${platform}" = "freebsd" ]; then pip --version 2>/dev/null || curl --silent --show-error https://bootstrap.pypa.io/get-pip.py | python elif [ "${platform}" = "rhel" ]; then - while true; do - yum install -y \ - gcc \ - python-devel \ - python-jinja2 \ - python-virtualenv \ - python2-cryptography \ - && break - echo "Failed to install packages. Sleeping before trying again..." - sleep 10 - done + if grep '8\.' /etc/redhat-release; then + while true; do + curl -o /etc/yum.repos.d/rhel-8-beta.repo http://downloads.redhat.com/redhat/rhel/rhel-8-beta/rhel-8-beta.repo && \ + dnf config-manager --set-enabled rhel-8-for-x86_64-baseos-beta-rpms && \ + dnf config-manager --set-enabled rhel-8-for-x86_64-appstream-beta-rpms && \ + yum -y module install python36 && \ + yum install -y \ + gcc \ + python3-devel \ + python3-jinja2 \ + python3-virtualenv \ + python3-cryptography \ + iptables \ + && break + echo "Failed to install packages. Sleeping before trying again..." + sleep 10 + done - pip --version 2>/dev/null || curl --silent --show-error https://bootstrap.pypa.io/get-pip.py | python + # When running from source our python shebang is: #!/usr/bin/env python + # To avoid modifying all of our scripts while running tests we make sure `python` is in our PATH. + if [ ! -f /usr/bin/python ]; then + ln -s /usr/bin/python3 /usr/bin/python + fi + if [ ! -f /usr/bin/pip ]; then + ln -s /usr/bin/pip3 /usr/bin/pip + fi + else + while true; do + yum install -y \ + gcc \ + python-devel \ + python-jinja2 \ + python-virtualenv \ + python2-cryptography \ + && break + echo "Failed to install packages. Sleeping before trying again..." + sleep 10 + done + + pip --version 2>/dev/null || curl --silent --show-error https://bootstrap.pypa.io/get-pip.py | python + fi fi if [ "${platform}" = "freebsd" ] || [ "${platform}" = "osx" ]; then