From 37e839d8daafa24e2d113e861fafb14747ea046a Mon Sep 17 00:00:00 2001 From: Louis Taylor Date: Fri, 5 Oct 2018 19:07:14 +0100 Subject: [PATCH] Fix linux pkg-config envs --- .travis.yml | 4 +--- Makefile | 2 ++ testing/install_cmocka.sh | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a955ed3..79efaa8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,9 +16,7 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cmocka; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./testing/install_cmocka.sh; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PKG_CONFIG_PATH=/home/travis/lib/pkgconfig ; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/home/travis/lib/; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then . ./testing/install_cmocka.sh; fi script: - make test diff --git a/Makefile b/Makefile index fbf2d45..7c7845e 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,8 @@ OBJ = boat.o sailing.o wind.o physics.o testing/test_sailing.o $(CC) -c -o $@ $< $(CFLAGS) test: $(OBJ) + echo ${PKG_CONFIG_PATH} + echo ${LD_LIBRARY_PATH} $(CC) -coverage -o test_sailing $^ $(CFLAGS) $(shell pkg-config --libs --cflags cmocka) clean: diff --git a/testing/install_cmocka.sh b/testing/install_cmocka.sh index 593e829..706768e 100755 --- a/testing/install_cmocka.sh +++ b/testing/install_cmocka.sh @@ -10,3 +10,6 @@ make make install cd ../.. + +export PKG_CONFIG_PATH=/home/travis/lib/pkgconfig +export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/home/travis/lib/