fix travis

This commit is contained in:
Thomas Fussell 2015-11-21 00:43:32 -05:00
parent 07f28f91c3
commit c456c920cc
2 changed files with 6 additions and 5 deletions

View File

@ -39,11 +39,11 @@ script:
- ../bin/xlnt.test
after_success:
- if [ "$COMPILER" = "g++-4.9" ]; then rm -rf ./* ; cd build ; fi
- if [ "$COMPILER" = "g++-4.9" ]; then rm -rf ./* ; fi
- if [ "$COMPILER" = "g++-4.9" ]; then cmake -G "Unix Makefiles" -D SHARED=1 -D BUILD_TESTS=1 -D CMAKE_CXX_COMPILER=$COMPILER -D CMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage" ../cmake ; fi
- if [ "$COMPILER" = "g++-4.9" ]; then make ; fi
- if [ "$COMPILER" = "g++-4.9" ]; then ../bin/xlnt.test ; fi
- if [ "$COMPILER" = "g++-4.9" ]; then coveralls --include ../source/worksheet/test_worksheet.hpp --gcov-options '\-lp' --gcov 'gcov-4.9' ; fi
- if [ "$COMPILER" = "g++-4.9" ]; then cd .. && ./bin/xlnt.test ; fi
- if [ "$COMPILER" = "g++-4.9" ]; then coveralls --exclude bin --exclude build --exclude cmake --exclude docs --include include --exclude lib --exclude samples --exclude source --exclude tests --exclude third-party --include source/worksheet/test_worksheet.hpp --gcov-options '\-lp' --gcov 'gcov-4.9' ; fi
notifications:
email: false

View File

@ -83,8 +83,9 @@ public:
char exepath[PATH_MAX + 1] = {0};
sprintf(arg1, "/proc/%d/exe", getpid());
readlink(arg1, exepath, 1024);
return std::string(exepath).substr(0, std::strlen(exepath) - 9);
auto bytes_written = readlink(arg1, exepath, 1024);
return std::string(exepath).substr(0, bytes_written - 9);
#endif
}