Skip to content

Commit

Permalink
Merge pull request #2351 from keepassxreboot/feature/coverage
Browse files Browse the repository at this point in the history
Improve test coverage, reformat CMakeFiles, and cleanup CLI
  • Loading branch information
droidmonkey authored Oct 19, 2018
2 parents b8d2d5d + 77adbef commit c749f70
Show file tree
Hide file tree
Showing 92 changed files with 3,333 additions and 2,128 deletions.
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

0 comments on commit c749f70

Please sign in to comment.