From 605233c7c995cc07cebe0a329a52c974d11c7275 Mon Sep 17 00:00:00 2001 From: Louis Taylor Date: Fri, 5 Oct 2018 18:58:45 +0100 Subject: [PATCH 1/2] Bump cmocka version --- testing/install_cmocka.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/install_cmocka.sh b/testing/install_cmocka.sh index ca85f5d..593e829 100755 --- a/testing/install_cmocka.sh +++ b/testing/install_cmocka.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -wget https://cmocka.org/files/1.0/cmocka-1.0.1.tar.xz -tar vxf cmocka-1.0.1.tar.xz -cd cmocka-1.0.1/ +wget https://cmocka.org/files/1.1/cmocka-1.1.3.tar.xz +tar vxf cmocka-1.1.3.tar.xz +cd cmocka-1.1.3/ mkdir build cd build/ cmake -DCMAKE_INSTALL_PREFIX=~ -DCMAKE_BUILD_TYPE=Release .. From 37e839d8daafa24e2d113e861fafb14747ea046a Mon Sep 17 00:00:00 2001 From: Louis Taylor Date: Fri, 5 Oct 2018 19:07:14 +0100 Subject: [PATCH 2/2] 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/