swift/tools/test-setup.sh
Thiago da Silva ca21d71152 Add swift probe tests to gate
This patch includes some generic playbooks to configure a SAIO[0]
plus the playbook to run the probe tests.

The current SAIO playbooks have only been tests on CentOS, they
would need additional changes to run on Ubuntu.

[0] - https://docs.openstack.org/swift/latest/development_saio.html

Change-Id: Ib72c77021aeed20f2070d42cff0ea9b671a4317a
2018-03-06 06:57:53 -05:00

31 lines
968 B
Bash
Executable File

#!/bin/bash -xe
# Set up a partition formatted with XFS to use as TMPDIR for our tests.
# OpenStack CI will invoke this script as part of tox based tests.
# The file .zuul.yaml set TMPDIR to $HOME/xfstmp.
# Create a large-ish file that we will mount as a loopback
truncate -s 1GB $HOME/1G_xfs_file
# Format the new file as XFS.
/sbin/mkfs.xfs $HOME/1G_xfs_file
# loopback mount the file
mkdir -p $HOME/xfstmp
sudo mount -o loop,noatime,nodiratime $HOME/1G_xfs_file $HOME/xfstmp
sudo chmod 777 $HOME/xfstmp
# Install liberasurecode-devel for CentOS from RDO repository.
function is_rhel7 {
[ -f /usr/bin/yum ] && \
cat /etc/*release | grep -q -e "Red Hat" -e "CentOS" -e "CloudLinux" && \
cat /etc/*release | grep -q 'release 7'
}
if is_rhel7; then
# Install CentOS OpenStack repos so that we have access to some extra
# packages.
sudo yum install -y centos-release-openstack-queens
sudo yum install -y liberasurecode-devel
fi