Skip to content

Commit b16a3c8

Browse files
authored
Travis: Use Boost package from Ubuntu repo (#90)
1 parent 3d5518a commit b16a3c8

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

.travis.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ matrix:
1212
compiler: clang
1313
include:
1414
- os: osx
15-
osx_image: xcode9.2
15+
osx_image: xcode10
1616
env: TOOL=test
1717
- os: linux
1818
env: TOOL=test
@@ -24,6 +24,10 @@ matrix:
2424
- gcc-8
2525
- g++-8
2626
- cmake
27+
- libboost-system1.55-dev
28+
- libboost-filesystem1.55-dev
29+
- libboost-test1.55-dev
30+
- libboost-program-options1.55-dev
2731
- os: linux
2832
env: TOOL=coverage
2933
addons:
@@ -40,6 +44,10 @@ matrix:
4044
- doxygen-latex
4145
- doxygen-gui
4246
- graphviz
47+
- libboost-system1.55-dev
48+
- libboost-filesystem1.55-dev
49+
- libboost-test1.55-dev
50+
- libboost-program-options1.55-dev
4351
branches:
4452
only:
4553
- dev
@@ -50,15 +58,10 @@ matrix:
5058
local_dir: build/doc/html
5159
on:
5260
branch: dev
53-
before_install:
54-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd ..; wget https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.gz; fi
55-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar xf boost_1_64_0.tar.gz; cd $TRAVIS_BUILD_DIR; fi
5661
install:
5762
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90; fi
58-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd ../boost_1_64_0; ./bootstrap.sh --with-libraries=test,program_options,system,filesystem; fi
59-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo ./b2 -j 4 install > /dev/null 2>&1; cd $TRAVIS_BUILD_DIR; fi
6063
before_script:
61-
- mkdir build; cd build
64+
- cd $TRAVIS_BUILD_DIR; mkdir build; cd build
6265
script:
6366
- if [[ $TOOL != "coverage" ]]; then cmake .. -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/installed;
6467
else cmake .. -DCMAKE_BUILD_TYPE=Debug; fi

test/testDerived.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ BOOST_AUTO_TEST_CASE(derivedRateInt)
3333
BOOST_CHECK_EQUAL(derived.getName(), "metricIntRate");
3434
BOOST_WARN_CLOSE(boost::get<double>(derived.getValue()), result.rate, 1.0);
3535
} catch(MonitoringException &e) {
36-
BOOST_TEST(e.what() == std::string("Not enough values"));
36+
BOOST_CHECK_EQUAL(e.what(), std::string("Not enough values"));
3737
}
3838
}
3939
}
@@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(derivedRateDouble) {
5555
BOOST_CHECK_EQUAL(derived.getName(), "metricDoubleRate");
5656
BOOST_WARN_CLOSE(boost::get<double>(derived.getValue()), result.rate, 1.0);
5757
} catch(MonitoringException &e) {
58-
BOOST_TEST(e.what() == std::string("Not enough values"));
58+
BOOST_CHECK_EQUAL(e.what(), std::string("Not enough values"));
5959
}
6060
}
6161
}
@@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE(derivedRateUint64_t) {
7777
BOOST_CHECK_EQUAL(derived.getName(), "metricUint64_tRate");
7878
BOOST_WARN_CLOSE(boost::get<double>(derived.getValue()), result.rate, 1.0);
7979
} catch(MonitoringException &e) {
80-
BOOST_TEST(e.what() == std::string("Not enough values"));
80+
BOOST_CHECK_EQUAL(e.what(), std::string("Not enough values"));
8181
}
8282
}
8383
}

test/testMetric.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ BOOST_AUTO_TEST_CASE(tags) {
7171
o2::monitoring::Metric metric = o2::monitoring::Metric{10, "myMetric"}.addTags({{"tag1", "value1"}, {"tag2", "value2"}});
7272
std::vector<Tag> tags = metric.getTags();
7373
for (auto const& tag: tags) {
74-
BOOST_TEST(tag.name.find("tag") != std::string::npos);
75-
BOOST_TEST(tag.value.find("value") != std::string::npos);
74+
BOOST_CHECK(tag.name.find("tag") != std::string::npos);
75+
BOOST_CHECK(tag.value.find("value") != std::string::npos);
7676
}
7777
}
7878

@@ -89,8 +89,8 @@ BOOST_AUTO_TEST_CASE(customCopyConstructor) {
8989

9090
std::vector<Tag> tags = copied.getTags();
9191
for (auto const& tag: tags) {
92-
BOOST_TEST(tag.name.find("tag") != std::string::npos);
93-
BOOST_TEST(tag.value.find("value") != std::string::npos);
92+
BOOST_CHECK(tag.name.find("tag") != std::string::npos);
93+
BOOST_CHECK(tag.value.find("value") != std::string::npos);
9494
}
9595
}
9696

0 commit comments

Comments
 (0)