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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
#!/bin/bash
#
# Copyright (C) 2024 Sutou Kouhei <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; version 2
# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1301, USA
set -exu
echo "debconf debconf/frontend select Noninteractive" | debconf-set-selections
apt update
apt install -V -y lsb-release wget
distribution=$(lsb_release --id --short | tr 'A-Z' 'a-z')
code_name=$(lsb_release --codename --short)
case "${distribution}" in
debian)
component=main
;;
ubuntu)
component=universe
;;
esac
architecture=$(dpkg --print-architecture)
wget https://packages.apache.org/artifactory/arrow/${distribution}/apache-arrow-apt-source-latest-${code_name}.deb
apt install -V -y ./apache-arrow-apt-source-latest-${code_name}.deb
wget https://packages.groonga.org/${distribution}/groonga-apt-source-latest-${code_name}.deb
apt install -V -y ./groonga-apt-source-latest-${code_name}.deb
apt update
repositories_dir=/host/packages/apt/repositories
apt install -V -y \
${repositories_dir}/${distribution}/pool/${code_name}/${component}/*/*/*_${architecture}.deb
# There are some problems for running arm64 tests:
# * Too long test time because of QEMU
if [ "${architecture}" == "arm64" ]; then
exit
fi
cp -a /host/test /test
cd /test
apt install -V -y \
gcc \
groonga-bin \
make \
ruby-dev \
tzdata
MAKEFLAGS=-j$(nproc) gem install grntest
grntest_options=()
grntest_options+=(--base-directory=.)
grntest_options+=(--n-retries=2)
grntest_options+=(--reporter=mark)
grntest_options+=(suite)
grntest "${grntest_options[@]}"
|