In tools/, it did not understand that some files are generated by
matchcompiler.py.
```
CMake Error at tools/CMakeLists.txt:7 (add_executable):
Cannot find source file:
</some/path>/cppcheck/build/lib/build/mc_pathmatch.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at tools/CMakeLists.txt:7 (add_executable):
No SOURCES given to target: dmake
```
Co-authored-by: Ken-Patrick Lehrmann <kp.lehrmann@gmail.com>
* cleaned up compiler options related code in CMake
* moved cmake_minimum_required() and raised to latest 2.8.x version
* use proper compiler version check / print compiler version
* fixed linking of sanitized builds
* added proper version checks to newer Clang warnings and enabled them / moved tinyxml_objs flags to proper compiler
* disabled -Wdeprecated-declarations for Clang
* compileroptions.cmake: removed unnecessary check for clang++ existence - CMAKE_CXX_COMPILER_ID is determined by CMake
* printInfo.cmake: removed unnecessary message for ANALYZE_ADDRESS - LSAN is part of ASAN and enabled by default
* cleaned up if() comparisons in CMake
* added/adjusted TODOs
Sometimes it could happen that SIGSEGV is thrown when Cppcheck is killed
because of a timeout. Then the execution is wrongly handled as a crash
and debugged with gdb instead of marking it as timed out.
This fixes that issue by checking the time out before checking sig_num.
* daca2: Improve package sorting using natsort
This switches the external dependency from semver to natsort, and
improves comparison of packages where one or more of the packages do not
use semantic versioning (major.minor.patch).
This also makes daca2-download and daca2-getpackages work with python 3.
In theory, they should work with python 2 as well, but I have not tested
it.
* Make daca2 scripts executable
* Update hashbangs to python3
* Update usage description
To avoid specifying python version in the usage description, just
show how to execute the scripts and leave the rest to the shebangs.
* No need to specify python version in start_donate_cpu_server_test_local.sh
Leave it to the hashbang instead.
This adds a timeout of 60 minutes for the Cppcheck analysis.
Timed out results do not count as crash but they are uploaded and
marked with "TO!" in the list of the latest results. No "diff" is
generated for timed out results so they do not add wrong entries to
the "Diff report".
In test-my-pr.py the timed out results are listed separately just like
the crashes.
donate-cpu-server.py: Add timeout report
Using .tar.xz packages adds about 4500 additional packages that can be
tested and changes many existing packages where a more recent version
can be used now that is only available as .tar.xz file.
Related ticket: https://trac.cppcheck.net/ticket/9508
donate-cpu.py: Require at least Python 3.4
xz support was added with 3.3.
There were two issues:
1. The version was not correctly extracted out of the filename. When
extracting a sub-string in Python one has to specify start index and
end index instead of start index and length.
2. The function `semver.cmp()` does nothing useful. Instead the function
`semver.compare()` must be called when two version should be compared.
See https://github.com/python-semver/python-semver/issues/117#issuecomment-479188221
Because `semver.compare()` now really compares the versions it is
possible that an exception is thrown if a version is not in the semver
version format. In such cases the sorting is aborted and the last
filename in the array is returned. This is often but not always already
the latest version from what I have seen.
* triage: Allow master as version
Log-files from test-my-pr.py shows "master" as version. Extend regexp to
match "master", and improve regexp handling slightly to avoid making
assumptions on the length of the version.
* triage: Show log-files when opening files
test-my-pr.py defaults to save output as "my_check_diff.log". Show
log-files by default to make it more convenient to check these files as
well.
Previously, calling test-my-pr with a relative work-path resulted in a
crash when trying to create the result file (due to the change of
current working directory).
* donate_cpu_lib: Fix python 3 crash if fail to get package
Decoding a string is not allowed in python 3 (in python 2 it works).
If fetching the package fails, assign an empty byte string instead to
avoid crashing.
* Initialize package instead
Yesterday, I observed that some client with a wrong jobs setting
(only "-j") requested one package after another and always uploaded
results where it only said that the argument "-j" is invalid for
Cppcheck.
This check should avoid such cases where results are overwritten with
useless data and the server is kept busy for nothing.