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

Improve test coverage #2351

Merged
merged 6 commits into from
Oct 19, 2018
Merged
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
286 changes: 145 additions & 141 deletions CMakeLists.txt

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ RUN set -x \
mesa-common-dev \
libyubikey-dev \
libykpers-1-dev \
libqrencode-dev
libqrencode-dev \
xclip \
xvfb

ENV PATH="/opt/${QT5_VERSION}/bin:${PATH}"
ENV CMAKE_PREFIX_PATH="/opt/${QT5_VERSION}/lib/cmake"
Expand Down
2 changes: 2 additions & 0 deletions ci/trusty/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ RUN set -x \
clang-3.6 \
libclang-common-3.6-dev \
clang-format-3.6 \
llvm-3.6 \
cmake3 \
make \
libgcrypt20-18-dev \
Expand All @@ -56,6 +57,7 @@ RUN set -x \
libxi-dev \
libxtst-dev \
libqrencode-dev \
xclip \
xvfb

ENV PATH="/opt/${QT5_VERSION}/bin:${PATH}"
Expand Down
62 changes: 30 additions & 32 deletions cmake/CLangFormat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,43 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

set(EXCLUDED_DIRS
# third-party directories
zxcvbn/
streams/QtIOCompressor
# objective-c directories
autotype/mac
)
# third-party directories
zxcvbn/
streams/QtIOCompressor
# objective-c directories
autotype/mac)

set(EXCLUDED_FILES
# third-party files
streams/qtiocompressor.cpp
streams/qtiocompressor.h
gui/KMessageWidget.h
gui/KMessageWidget.cpp
gui/MainWindowAdaptor.h
gui/MainWindowAdaptor.cpp
sshagent/bcrypt_pbkdf.cpp
sshagent/blf.h
sshagent/blowfish.c
tests/modeltest.cpp
tests/modeltest.h
# objective-c files
core/ScreenLockListenerMac.h
core/ScreenLockListenerMac.cpp
)
# third-party files
streams/qtiocompressor.cpp
streams/qtiocompressor.h
gui/KMessageWidget.h
gui/KMessageWidget.cpp
gui/MainWindowAdaptor.h
gui/MainWindowAdaptor.cpp
sshagent/bcrypt_pbkdf.cpp
sshagent/blf.h
sshagent/blowfish.c
tests/modeltest.cpp
tests/modeltest.h
# objective-c files
core/ScreenLockListenerMac.h
core/ScreenLockListenerMac.cpp)

file(GLOB_RECURSE ALL_SOURCE_FILES *.cpp *.h)
foreach (SOURCE_FILE ${ALL_SOURCE_FILES})
foreach (EXCLUDED_DIR ${EXCLUDED_DIRS})
foreach(SOURCE_FILE ${ALL_SOURCE_FILES})
foreach(EXCLUDED_DIR ${EXCLUDED_DIRS})
string(FIND ${SOURCE_FILE} ${EXCLUDED_DIR} SOURCE_FILE_EXCLUDED)
if (NOT ${SOURCE_FILE_EXCLUDED} EQUAL -1)
if(NOT ${SOURCE_FILE_EXCLUDED} EQUAL -1)
list(REMOVE_ITEM ALL_SOURCE_FILES ${SOURCE_FILE})
endif ()
endforeach ()
foreach (EXCLUDED_FILE ${EXCLUDED_FILES})
if (${SOURCE_FILE} MATCHES ".*${EXCLUDED_FILE}$")
endif()
endforeach()
foreach(EXCLUDED_FILE ${EXCLUDED_FILES})
if(${SOURCE_FILE} MATCHES ".*${EXCLUDED_FILE}$")
list(REMOVE_ITEM ALL_SOURCE_FILES ${SOURCE_FILE})
endif ()
endforeach ()
endforeach ()
endif()
endforeach()
endforeach()

add_custom_target(
format
Expand Down
Loading