Skip to content

Commit c91d7cc

Browse files
authored
Merge branch 'master' into less-flakey-test-distribution
2 parents 44e6c62 + 2e1a034 commit c91d7cc

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.pfnci/run.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,19 @@ main() {
5454
--hint="/chainerrl/.pfnci/hint.pbtxt"
5555
)
5656

57+
UBUNTU_VERSION_ID=$(grep DISTRIB_RELEASE /etc/lsb-release | cut -d "=" -f2)
58+
if [ "$UBUNTU_VERSION_ID" = "16.04" ]; then
59+
# Because ffmpeg of ubuntu 16.04 causes segmentation fault,
60+
# we use jonathonf/ffmpeg-3
61+
apt-get update -q
62+
apt-get install -qy --no-install-recommends software-properties-common
63+
add-apt-repository ppa:jonathonf/ffmpeg-3
64+
fi
65+
5766
apt-get update -q
5867
apt-get install -qy --no-install-recommends \
5968
"${PYTHON}-dev" "${PYTHON}-pip" "${PYTHON}-setuptools" \
60-
zlib1g-dev make cmake g++ git
69+
zlib1g-dev make cmake g++ git ffmpeg freeglut3-dev xvfb
6170

6271
if [ "${CHAINER}" != '' ]; then
6372
"${PYTHON}" -m pip install "chainer==${CHAINER}"
@@ -77,7 +86,10 @@ main() {
7786
git config --global user.email "you@example.com"
7887
git config --global user.name "Your Name"
7988

89+
# Xvfb's default screen is 1280x1024x8, which seems to cause a problem.
90+
# https://bugzilla.redhat.com/show_bug.cgi?id=904851
8091
OMP_NUM_THREADS=1 PYTHONHASHSEED=0 \
92+
xvfb-run --server-args="-screen 0 1280x800x24" \
8193
xpytest "${xpytest_args[@]}" '/chainerrl/tests/**/test_*.py'
8294
}
8395

0 commit comments

Comments
 (0)