From 8b3a3648a248230f69cb6c2e41cdfb9ec886f32f Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Mon, 22 Jul 2019 01:14:41 +0700 Subject: [PATCH] Add travis (#3367) * Run ldconfig in install.sh This works around a problem installing on a bare chromeos image. Related to https://github.com/skycocker/chromebrew/issues/3305 * Add .travis.yml to test installation Closes https://github.com/skycocker/chromebrew/issues/3353 --- .travis.yml | 17 +++++++++++++++++ install.sh | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..444c724ff --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: bash +services: + - docker + +before_install: + - docker pull brunux/chromeos + +script: + # Workaround sudo prompting for password by editing existing chronos entry + - docker run -it + -v $PWD:/travis + brunux/chromeos + /bin/sh -c " + grep chronos /etc/sudoers > /tmp/sudoers.new; + sed s/chronos/ALL/ /tmp/sudoers.new > /etc/sudoers; + sudo -u chronos bash /travis/install.sh; + " diff --git a/install.sh b/install.sh index 31bc2c7e2..ad8f4b431 100755 --- a/install.sh +++ b/install.sh @@ -184,6 +184,9 @@ for i in $(seq 0 $((${#urls[@]} - 1))); do update_device_json "${name}" "${version}" done +# workaround https://github.com/skycocker/chromebrew/issues/3305 +sudo ldconfig > /dev/null 2> /dev/null || true + # create symlink to 'crew' in ${CREW_PREFIX}/bin/ rm -f "${CREW_PREFIX}/bin/crew" ln -s "../lib/crew/crew" "${CREW_PREFIX}/bin/"