From 9a28e06037f95328fd774bfd1578701f9d67a639 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Sun, 31 May 2015 21:05:08 -0500 Subject: [PATCH] Fixed tests for Travis. --- .travis.yml | 7 ++++--- tasks/install-from-source.yml | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 033fcc3..5e5a6bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,11 +33,12 @@ script: # Run the role/playbook in --check mode. - "ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo --check" - - find / -name 'gmp.h' - - # Make sure PHP is running. + # Make sure PHP is available. - > php -v | grep -q 'The PHP Group' && (echo 'PHP is installed' && exit 0) || (echo 'PHP is not installed' && exit 1) + + # And for posterity... + - php -v diff --git a/tasks/install-from-source.yml b/tasks/install-from-source.yml index 7ce8384..e74e30e 100644 --- a/tasks/install-from-source.yml +++ b/tasks/install-from-source.yml @@ -41,11 +41,16 @@ - librecode-dev when: ansible_os_family == 'Debian' +- name: Check if gmp.h is already in a location accessible to gcc. + stat: path=/usr/include/gmp.h + register: gmp_file + - name: Ensure gmp.h is symlinked into a location accessible to gcc. file: src: /usr/include/x86_64-linux-gnu/gmp.h dest: /usr/include/gmp.h state: link + when: gmp_file.stat.exists == false - name: Clone the PHP repository. git: