Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Travis #291

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
aa70f9e
Fix a typo
peternewman Oct 12, 2020
472e155
Call the new script name
peternewman Oct 12, 2020
7d5f532
Fix the Travis build
peternewman Jan 14, 2021
119be6e
Install both gmock and gtest so the install works
peternewman Jan 14, 2021
9d0b1aa
Fix the codespell run
peternewman Mar 1, 2021
8e103a7
Install OLA from Ubuntu source on bionic
peternewman Mar 1, 2021
05a29e7
Only install some old repos on trusty
peternewman Mar 3, 2021
1f5ce9a
Merge pull request #289 from OpenLightingProject/peternewman-coverage…
peternewman Mar 3, 2021
e71a3db
Fix another typo
peternewman Mar 3, 2021
979ec62
Fix more typos
peternewman Mar 3, 2021
6e30b4c
Fix another typo
peternewman Mar 3, 2021
6a7bf71
gtest now builds in a subfolder with cmake
peternewman Mar 3, 2021
f933d13
Just look for the built files in build
peternewman Mar 3, 2021
eb135ed
Do some more debugging
peternewman Mar 3, 2021
312cbd9
Make after cmake
peternewman Mar 3, 2021
aa8e095
Correct the gmock/gtest library paths
peternewman Mar 3, 2021
bfea2ee
Add another using to fix the tests
peternewman Mar 3, 2021
2b4d07b
Switch to clang 8
peternewman Mar 3, 2021
f6b912c
Fix the clang 8 versioning/naming
peternewman Mar 3, 2021
07e69b7
Fix the c++ clang 8 versioning/naming
peternewman Mar 3, 2021
6f24b07
Try switching to clang 12 on bionic
peternewman Mar 3, 2021
0e9958d
Remove some redundant frees of non malloc'ed data
peternewman Mar 4, 2021
e2a804a
Change from INSTANTIATE_TEST_CASE_P to INSTANTIATE_TEST_SUITE_P
peternewman Mar 4, 2021
d0ccb0a
Change from INSTANTIATE_TEST_CASE_P to INSTANTIATE_TEST_SUITE_P
peternewman Mar 4, 2021
b4830f2
Change from INSTANTIATE_TEST_CASE_P to INSTANTIATE_TEST_SUITE_P
peternewman Mar 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if [[ $TASK = 'lint' ]]; then
if [[ $? -ne 0 ]]; then
exit 1;
fi;
./scripts/verify_cpplint_coverge.py ./ ./cpplint.log
./scripts/verify_cpplint_coverage.py ./ ./cpplint.log
elif [[ $TASK = 'check-licences' ]]; then
# check licences only if it is the requested task
./scripts/enforce_licence.py
Expand Down
23 changes: 12 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ matrix:
fast_finish: true
include:
- os: linux
dist: trusty
dist: bionic
compiler: clang
env: TASK='compile'
- os: linux
Expand Down Expand Up @@ -39,7 +39,7 @@ matrix:
sudo: false
env: TASK='check-licences'
- os: linux
dist: trusty
dist: bionic
# Short duration job, use the container/without sudo image as it boots faster
sudo: false
env: TASK='codespell'
Expand Down Expand Up @@ -81,12 +81,13 @@ before_install:
# Remove some flaky repos that keep timing out, probably not necessary any more
- if [ -e /etc/apt/sources.list.d/mongodb.list ]; then sudo rm /etc/apt/sources.list.d/mongodb.list; fi
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo add-apt-repository ppa:voltvisionfrenchy/ola -y
- sudo add-apt-repository "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty main" -y
- sudo add-apt-repository "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-6.0 main" -y
# Installed directly from Ubuntu on bionic
- if [ "$TRAVIS_DIST" = "trusty" ]; then sudo add-apt-repository ppa:voltvisionfrenchy/ola -y; fi
- wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- if [ "$TRAVIS_DIST" = "bionic" ]; then sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main" -y; fi
- if [ "$TRAVIS_DIST" = "bionic" ]; then sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main" -y; fi
# Required for Doxygen 1.8.8+
- sudo add-apt-repository ppa:techzilla/doxygen-backport -y
- if [ "$TRAVIS_DIST" = "trusty" ]; then sudo add-apt-repository ppa:techzilla/doxygen-backport -y; fi
- sudo apt-get update -qq
- sudo apt-get install --force-yes ola libola-dev libprotobuf-dev
#Coverity doesn't work with g++ 5, so only upgrade to g++ 4.9 for that
Expand All @@ -98,18 +99,19 @@ before_install:
- if [ "$CXX" = "g++-4.9" -o "$CXX" = "g++-5" ]; then sudo rm /usr/bin/g++; sudo rm /usr/bin/gcc; fi
#Install latest clang if we're compiling with clang
#clang-3.8 packages seem to be unsigned so need forcing
- if [ "$CXX" = "clang++" ]; then sudo apt-get install --force-yes -qq clang-6.0; fi
- if [ "$CXX" = "clang++" ]; then export CXX="clang++-6.0" CC="clang-6.0"; fi
- if [ "$CXX" = "clang++" ]; then sudo apt-get install --force-yes -qq clang-12; fi
- if [ "$CXX" = "clang++" ]; then export CXX="clang++-12" CC="clang-12"; fi
#Remove the old clang to ensure we're using the latest ones
- if [ "$CXX" = "clang++-6.0" -a -e /usr/local/clang-3.4/bin/clang ]; then sudo rm /usr/local/clang-3.4/bin/clang; sudo rm /usr/local/clang-3.4/bin/clang++; fi
- if [ "$CXX" = "clang++-12" -a -e /usr/local/clang-3.4/bin/clang ]; then sudo rm /usr/local/clang-3.4/bin/clang; sudo rm /usr/local/clang-3.4/bin/clang++; fi
#Report the compiler version
- $CXX --version
#Install coveralls if required
- if [ "$TASK" = "coverage" ]; then sudo pip install -qq cpp-coveralls; fi
#Install doxygen if required
- if [ "$TASK" = "doxygen" -o "$TASK" = "doxygen-manual" ]; then sudo apt-get install -qq doxygen graphviz; fi
- if [ "$TASK" = "compile" -o "$TASK" = "doxygen" -o "$TASK" = "doxygen-manual" -o "$TASK" = "coverage" -o "$TASK" = "coverity" ]; then ./install-gmock.sh; fi
- if [ "$TASK" = "codespell" ]; then pip install --user git+https://github.com/codespell-project/codespell.git; fi
- if [ "$TASK" = "codespell" ]; then pyenv global 3.8.1; fi
- if [ "$TASK" = "codespell" ]; then pip3 install --user git+https://github.com/codespell-project/codespell.git; fi

after_success:
- if [ "$TASK" = "coverity" ]; then tail -n 10000 /home/travis/build/${TRAVIS_REPO_SLUG}/cov-int/build-log.txt; cat /home/travis/build/${TRAVIS_REPO_SLUG}/cov-int/scm_log.txt; fi
Expand All @@ -118,7 +120,6 @@ after_success:
after_failure:
- cat /home/travis/build/${TRAVIS_REPO_SLUG}/config.log


#No notifications for now
#notifications:
# irc:
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ AC_ARG_WITH([gmock],
# This is a mess, see
# http://stackoverflow.com/questions/27091835/undefined-reference-to-pthread-key-create-argument-order-does-not-fix-issue
GMOCK_INCLUDES="-isystem $with_gmock/googlemock/include"
GMOCK_LIBS="$PTHREAD_CFLAGS $with_gmock/googlemock/lib/.libs/libgmock_main.a $with_gmock/googlemock/lib/.libs/libgmock.a"
GMOCK_LIBS="$PTHREAD_CFLAGS $with_gmock/build/lib/libgmock_main.a $with_gmock/build/lib/libgmock.a"
GTEST_INCLUDES="-isystem $with_gmock/googletest/include"
GTEST_LIBS="$PTHREAD_CFLAGS $with_gmock/googletest/lib/.libs/libgtest.a $with_gmock/googletest/lib/.libs/libgtest_main.a"
GTEST_LIBS="$PTHREAD_CFLAGS $with_gmock/build/lib/libgtest.a $with_gmock/build/lib/libgtest_main.a"

# save CPPFLAGS
old_cppflags=$CPPFLAGS
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/dimmer_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* ### Presets & Scenes.
*
* The root device provides 3 scenes. The first scene (index 1) is a factory
* programed scene, which can't be modified. The 2nd and 3rd scenes can be
* programmed scene, which can't be modified. The 2nd and 3rd scenes can be
* 'updated' with capture preset.
*
* DMX_FAIL_MODE and DMX_STARTUP_MODE can be used to change the on-failure and
Expand Down
4 changes: 2 additions & 2 deletions firmware/src/transceiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ typedef enum {
*/
typedef union {
/**
* @brief The timing measurments for a DUB transaction.
* @brief The timing measurements for a DUB transaction.
*
* All times are measured in 10ths of a microsecond from the end of the DUB
* frame.
Expand All @@ -159,7 +159,7 @@ typedef union {
} dub_response;

/**
* @brief The timing measurments for a Get / Set transaction.
* @brief The timing measurements for a Get / Set transaction.
*
* All times are measured in 10ths of a microsecond from the end of the DUB
* frame.
Expand Down
8 changes: 3 additions & 5 deletions install-gmock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ else
git clone $GTEST_REPO $GTEST_DIRECTORY
cd $GTEST_DIRECTORY;
fi
# Ideally do some clever detection of which flavour of gmock people have, for
# now they'll just need to upgrade...
#cd googlemock
autoreconf -fi
./configure
mkdir build
cd build
cmake ..
make
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# verify_cpplint_coverge.py
# verify_cpplint_coverage.py
# Copyright (C) 2016 Peter Newman

from __future__ import print_function
Expand Down Expand Up @@ -116,7 +116,7 @@ def main():

print('\n---------------------------------------', file=sys.stderr)
print('Either add the missing files to the cpplint run or update\n'
'IGNORE_PATTERNS in scripts/verify_cpplint_coverge.py',
'IGNORE_PATTERNS in scripts/verify_cpplint_coverage.py',
file=sys.stderr)
print('---------------------------------------', file=sys.stderr)
sys.exit(1)
Expand Down
6 changes: 3 additions & 3 deletions tests/tests/CoarseTimerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ TEST_P(CoarseTimerTest, TimerWorks) {
EXPECT_EQ(99, timer_events);
}

INSTANTIATE_TEST_CASE_P(InstantiationName,
CoarseTimerTest,
::testing::Values(0, 1, 52, 0xfffffffe, 0xffffffff));
INSTANTIATE_TEST_SUITE_P(InstantiationName,
CoarseTimerTest,
::testing::Values(0, 1, 52, 0xfffffffe, 0xffffffff));

TEST_F(CoarseTimerTest, interruptClear) {
EXPECT_CALL(m_sys_int_mock, SourceStatusClear(INT_SOURCE_TIMER_2));
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/MessageHandlerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ TEST_P(ConfigurationTest, CheckSetGet) {
MessageHandler_HandleMessage(&get_message);
}

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
SetCommand,
ConfigurationTest,
::testing::Values(
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/RDMUtilTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ TEST_P(ChecksumTest, checksumFails) {
EXPECT_FALSE(RDMUtil_VerifyChecksum(SAMPLE_MESSAGE, GetParam()));
}

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
sizeTooSmall,
ChecksumTest,
::testing::Range(
Expand Down
1 change: 1 addition & 0 deletions tests/tests/USBTransportTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "usb_transport.h"

using ::testing::Args;
using ::testing::DoAll;
using ::testing::InSequence;
using ::testing::Mock;
using ::testing::NotNull;
Expand Down
2 changes: 0 additions & 2 deletions tools/hex2dfu.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,12 @@ void ProcessHexFile(int fd, const Options *options) {
r = read(fd, &checksum_data, sizeof(checksum_data));
if (r != sizeof(checksum_data)) {
printf("Failed to read checksum on line %d\n", line);
free(data);
return;
}

uint8_t checksum;
if (!HexToUInt8(checksum_data, &checksum)) {
printf("Invalid checksum on line %d\n", line);
free(data);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion user_manual/docs/rdm-responder.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ modulation frequencies.
## Presets & Scenes.

The root device provides 3 scenes. The first scene (index 1) is a factory
programed scene, which can't be modified. The 2nd and 3rd scenes can be
programmed scene, which can't be modified. The 2nd and 3rd scenes can be
'updated' with capture preset.

DMX_FAIL_MODE and DMX_STARTUP_MODE can be used to change the on-failure and
Expand Down