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

[#43] Use system gtest #102

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
!/CMakeLists.txt
/*.cmake
/Makefile
/gmock/
/*.cpp
/include/
/ts/ts.qrc.depends
Expand Down
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,23 @@ before_install:
- sudo add-apt-repository --yes ppa:chewing/chewing
- sudo add-apt-repository --yes ppa:chewing/travis-ci
- sudo apt-get update
# FIXME: We need to instal cmake-data manually to prevent cmake upgrade fails.
- sudo apt-get install --yes cmake-data cmake gcc-4.8 g++-4.8 help2man libchewing3-dev pkg-config qt5-default qttools5-dev-tools
# FIXME: We need to install cmake-data manually to prevent cmake upgrade fails.
- sudo apt-get install --yes cmake-data cmake gcc-4.8 g++-4.8 help2man libchewing3-dev pkg-config qt5-default qttools5-dev-tools libgtest-dev
- sudo ln -fs /usr/bin/gcc-4.8 /usr/bin/gcc
- gcc --version
- sudo ln -fs /usr/bin/g++-4.8 /usr/bin/g++
- g++ --version
- sudo ln -fs /usr/bin/gcov-4.8 /usr/bin/gcov
- gcov --version

# building libgtest on ubuntu
# ref: https://github.com/travis-ci/travis-ci/issues/1294
- "cd /usr/src/gtest && sudo cmake . && sudo cmake --build . && sudo mv libg* /usr/local/lib/ ; cd -"

script:
- cmake $OPTION .
- make -j2
- make -j2 check

after_success:
- if [ x$COVERALLS == xyes ]; then coveralls --exclude gmock --exclude test --exclude-pattern '.*CMake[^/]+\.c(?:pp)?' --exclude-pattern '.*_automoc.cpp'; fi
- if [ x$COVERALLS == xyes ]; then coveralls --exclude test --exclude-pattern '.*CMake[^/]+\.c(?:pp)?' --exclude-pattern '.*_automoc.cpp'; fi
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ install(

include_directories(
${PROJECT_BINARY_DIR}/include
${PROJECT_SOURCE_DIR}/gmock/gtest/include
${PROJECT_SOURCE_DIR}/src/exporter
${PROJECT_SOURCE_DIR}/src/importer
${PROJECT_SOURCE_DIR}/src/model
Expand Down Expand Up @@ -226,7 +225,6 @@ endif()

# testing
enable_testing()
add_subdirectory(gmock)

file(GLOB run-test_src
test/*.cpp
Expand All @@ -235,7 +233,8 @@ add_executable(run-test
${run-test_src}
)
target_link_libraries(run-test
gmock
gtest
gtest_main

exporter
importer
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ increase input performance.
* Qt = 5
* Editor with [EditorConfig](http://editorconfig.org/) support
* [lcov](http://ltp.sourceforge.net/coverage/lcov.php) for coverage testing
* [googletest](https://github.com/google/googletest) as testing framework

## Build

Expand Down
126 changes: 0 additions & 126 deletions gmock/CHANGES

This file was deleted.

171 changes: 0 additions & 171 deletions gmock/CMakeLists.txt

This file was deleted.

Loading