From 848608ea2935fbf6e3c89de1b465bbf5a00f3853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Mon, 19 Sep 2016 20:16:14 +0200 Subject: [PATCH] Use external pre-baked docker image for fedora tests to speed them up --- .travis.yml | 2 +- fedora/configure_fresh_system | 32 +++++++++++++++++--------------- test | 6 +++++- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index dd077d75..3b22ecd4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ script: - ./test env: - - DETECTED_OS=fedora:24 + - DETECTED_OS=fedora:24 DOCKER_IMAGE=cyplo/fedora24_base NO_COMPILE_VIM=true - DETECTED_OS=debian:jessie NOUPGRADE=true - DETECTED_OS=ubuntu:trusty - DETECTED_OS=ubuntu:xenial diff --git a/fedora/configure_fresh_system b/fedora/configure_fresh_system index 95c0c86a..62608dab 100755 --- a/fedora/configure_fresh_system +++ b/fedora/configure_fresh_system @@ -25,21 +25,23 @@ if [[ -z $NO_SYSTEMCTL ]]; then sudo systemctl list-timers "*dnf-*" fi -VIM_BUILD_DIR=/tmp -cd "$VIM_BUILD_DIR" -git clone https://github.com/vim/vim.git -cd vim -./configure --with-features=huge \ - --enable-multibyte \ - --enable-rubyinterp \ - --enable-python3interp=yes \ - --enable-luainterp \ - --enable-gui=no \ - --enable-cscope -make -j2 -sudo make install -cd -rm -fvr "$VIM_BUILD_DIR/vim" +if [[ -z $NO_COMPILE_VIM ]]; then + VIM_BUILD_DIR=/tmp + cd "$VIM_BUILD_DIR" + git clone https://github.com/vim/vim.git + cd vim + ./configure --with-features=huge \ + --enable-multibyte \ + --enable-rubyinterp \ + --enable-python3interp=yes \ + --enable-luainterp \ + --enable-gui=no \ + --enable-cscope + make -j2 + sudo make install + cd + rm -fvr "$VIM_BUILD_DIR/vim" +fi DIR="$DIR/../" DIR="$DIR" $DIR/common/configure_fresh_system diff --git a/test b/test index 10466feb..8cdec1a2 100755 --- a/test +++ b/test @@ -25,5 +25,9 @@ else DIR=$SYSTEM_DIR fi -docker run -v $CURRENT_DIR:$INSIDER_ROOT_DIR $DETECTED_OS $INSIDER_ROOT_DIR/$DIR/test_insider +if [[ -z $DOCKER_IMAGE ]]; then + DOCKER_IMAGE="$DETECTED_OS" +fi + +docker run -v $CURRENT_DIR:$INSIDER_ROOT_DIR $DOCKER_IMAGE $INSIDER_ROOT_DIR/$DIR/test_insider