Skip to content

Commit

Permalink
Added Travis file for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
amallia committed Jun 28, 2017
1 parent 802d395 commit 7ac0e8b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
sudo: false
dist: trusty

language: cpp

cache:
apt: true

addons:
apt:
packages:
- g++
compiler:
- g++

script: mkdir build && cd build && cmake .. && make && ctest --verbose && cd ..

3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -- Project Setup ------------------------------------------------------------

project(libbf CXX)
project(libbf CXX C)

include(CTest)

Expand Down Expand Up @@ -47,6 +47,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
set(CMAKE_EXE_LINKER_FLAGS "-pthread")

if (ENABLE_DEBUG)
set(CMAKE_BUILD_TYPE Debug)
Expand Down
9 changes: 7 additions & 2 deletions test/unit_test_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,12 @@ bool engine::run(bool colorize,
// psv == pipe-separated-values
strvec result;
if (psv != ".*") {
split(result, psv, "|", token_compress_on);
std::istringstream ss(psv);
std::string token;
while( std::getline(ss, token, ',')) {
if(token.size())
result.push_back(token);
}
std::sort(result.begin(), result.end());
}
return result;
Expand Down Expand Up @@ -552,7 +557,7 @@ int main(int argc, char** argv) {
break;
}
}
// TODO: convert CAF implementation details to generic ones
// TODO: convert CAF implementation details to generic ones
// our simple command line parser.
//auto res = message_builder(cli_argv, cli_argv + divider - 1).extract_opts({
// {"no-colors,n", "disable coloring"},
Expand Down

0 comments on commit 7ac0e8b

Please sign in to comment.