Commit Graph

1031 Commits

Author SHA1 Message Date
Sebastian d8e0f40663
donate-cpu/test-my-pr: Minor fixes (PEP 8, old Python 2 code, ...) (#2499)
* donate-cpu/test-my-pr: Minor fixes (PEP 8, old Python 2 code, ...)

* test-my-pr.py: Add Python 3 shebang
2020-01-21 14:27:39 +01:00
Sebastian 7c7b0e55ed
daca2-getpackages.py: Fix #9508: Add support for xz compressed archives (#2493)
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.
2020-01-17 12:23:07 +01:00
Sebastian 53623ddf6f
daca2-getpackages.py: Fix semver sorting and getting latest package (#2490)
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.
2020-01-16 20:02:56 +01:00
Sebastian cd9ec5aac6
daca@home client: Require at least Python 3 from now on (#2491)
This makes it possible to implement new features like .tar.xz support
(see https://trac.cppcheck.net/ticket/9508) or aborting endlessly
running analysis via timeout (see
https://sourceforge.net/p/cppcheck/discussion/development/thread/86813a8a53/).
2020-01-16 20:01:46 +01:00
Rikard Falkeborn 41caf28c6f Make triage work with log-files from test-my-pr.py (#2468)
* 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.
2020-01-03 19:33:42 +01:00
versat 5715ba7ce0 Donate CPU client test scripts: Use Python from shebang 2019-12-22 19:33:10 +01:00
versat 5d007bb9bb donate_cpu_lib.py: Enable library detection as planned after 1.90 release 2019-12-21 19:26:31 +01:00
versat 7216c3079c donate-cpu-server.py: Set OLD_VERSION to 1.90 2019-12-21 19:12:41 +01:00
Daniel Marjamäki 6890757986 Update Copyright year 2019-12-21 11:23:01 +01:00
Rikard Falkeborn eb6203cee3 test-my-pr: Allow work_path to be relative (#2444)
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).
2019-12-12 16:43:40 +01:00
Rikard Falkeborn 3ff4d83e6d donate_cpu_lib: Fix python 3 crash if fail to get package (#2445)
* 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
2019-12-12 15:04:25 +01:00
Sebastian de4d44ae2f
opencv2.cfg: Add initial OpenCV 2.x API Library Configuration (#2439) 2019-12-10 19:34:30 +01:00
amai2012 7fdaa4ae89 Sync dmake and Makefile (change missing from 3a71eb834d) 2019-12-04 20:27:48 +01:00
amai2012 3a71eb834d Run xmllint on cppcheck-errors.rng. Speed up creation of example XML output for validateXML target 2019-12-02 22:03:59 +01:00
Bo Rydberg e6d692d960 Fix daca2 using latest version of package (#2393)
* Add semver import for sorting ls-lR list

* Fix using latest release version of package

* Import semver with pip in travis file
2019-11-24 13:05:21 +01:00
Sebastian 1b28fb2d1a
donate-cpu.py: Verify argument for jobs (-jN) (#2386)
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.
2019-11-22 22:04:41 +01:00
Sebastian 5f2f19a646
dmake: Update Visual Studio solution and project (#2385)
This also fixes syntax errors for modern code that is not supported
by old Visual Studio IDEs/compilers.
2019-11-21 19:39:19 +01:00
versat 946c5e4dbc astyle client/server: Remove scripts because they are not used
If someone needs them please tell us and we can restore the scripts
and let the server run again.
2019-11-21 08:06:26 +01:00
Sebastian 590ec74998
astyle client/server: Update server address + minor changes (#2383) 2019-11-21 08:01:05 +01:00
Armin Müller 130ebe4b85 Typos found by running "codespell" (#2380) 2019-11-19 20:02:24 +01:00
amai2012 0024c3e446 Run xmllint on cfg/cppcheck-cfg.rng 2019-11-17 16:25:10 +01:00
Sebastian 9e0ae11ca2
Donate CPU client: Fix TortoiseSVN analysis (#2353)
- Keep Visual Studio Solution/Project files
- Remove Linux library configurations
- Use correct path to solution file
2019-11-12 15:34:04 +01:00
versat c04589faf3 donate_cpu_lib.py: Prepare using new configs mfc.cfg, microsoft_atl.cfg
This will especially improve analysis of Windows projects like
TortoiseSVN which has been added with fb8b9b12cb
2019-11-12 12:15:50 +01:00
Daniel Marjamäki fb8b9b12cb donate-cpu: adjust options for TortoiseSVN 2019-11-10 13:36:34 +01:00
Daniel Marjamäki 8c9b717773 donate-cpu-server: tweaks for package http://cppcheck.sf.net/tortoisesvn.tgz 2019-11-09 19:30:15 +01:00
Sebastian b93321e038
donate-cpu.py: Add shebang, warn when run under Python 2 (#2336)
Add shebang to run the client via Python 3 by default.
Add warning if Python 2 is used.
As discussed in the forum https://sourceforge.net/p/cppcheck/discussion/development/thread/86813a8a53/ switching to Python 3 has some benefits.
2019-11-09 18:18:57 +01:00
Sebastian 828a3fda1f
pylintrc_travis: Enable more checks, fix anomalous-backslash-in-string issues (#2334) 2019-11-06 17:49:37 +01:00
Sebastian 0a38b1b511 pylintrc_travis: Enable more messages and fix issues (#2332)
The plan is to enable more and more useful messages and fix the issues
step by step to improve the code quality.
2019-11-05 21:05:43 +01:00
Sebastian 83caedec8a
donate-cpu.py: Fix two pylint warnings (#2327)
Line 102: Comparison to literal
Line 117: Unnecessary "else" after "break"
2019-11-04 18:36:14 +01:00
Maksim Derbasov afe59531c7 Triage cleanup (#2324)
* regex for version

* fields names improved

* codestyle

* m prefix for fsmodel

* string duplication removed

* find in files: show all entries

* spaces

* added hint to checkboxes; element naming fixed

* layout naming improvement

* spacing 6->1
2019-11-04 07:10:31 +01:00
Maksim Derbasov 7de55b09f8 Triage tool ui improvement (#2320)
* triage tool: ui improvement

* small code tweak

* ci fix

* ci fix 2nd attempt
2019-11-03 08:30:30 +01:00
Armin Müller c95b5d0a3c donate-cpu-server.py: Add explanation how to read timing list (#2315)
* Add explanation how to read timing list

* fixed HTML
2019-11-03 08:27:05 +01:00
Daniel Marjamäki 908cd39572 daca2-packages: improved filter for versions 2019-11-03 08:13:06 +01:00
Daniel Marjamäki dbbea54b74 daca2-getpackages: if a package has many versions then only scan latest 2019-11-03 08:05:06 +01:00
Maksim Derbasov 91a4bcd71e Triage tool usability improvement (#2319)
* gitignore for triage tool

* window header

* Search filename / in files functionallity for triage tool

* small codeclean
2019-11-01 09:29:00 +01:00
Sebastian 8b2903d5ce openssl.cfg: Add OpenSSL library configuration with tests (#2248)
* openssl.cfg: Add OpenSSL library configuration with tests

Reference: https://www.openssl.org/docs/man1.1.1/man3/

* openssl.cfg: Add some configurations for EVP functions

Add alloc/dealloc configuration for EVP_CIPHER_CTX_new and
EVP_CIPHER_CTX_free.
Add configuration for encryption functions that are used in example code
which is added to the tests.
2019-10-31 09:21:08 +01:00
Maksim Derbasov e1c41765f5 Update tools/readme.md (#2300)
* Update readme.md

* Update readme.md
2019-10-29 20:05:16 +01:00
Sebastian ec521fba36
donate-cpu-server.py: Upgrade to work with Python 3 (drop Python 2 support) (#2292)
* donate-cpu-server.py: Use tools to prepare code to work with Python 3

The following commands were used for these changes:
futurize -1 -w donate-cpu-server.py
2to3 -w donate-cpu-server.py

* Make the server work under Python 3

Manually fixed the Unicode issues. Received data is decoded, sent data
is encoded.

* Add backward compatible type hints (in comments)

This enables better static analysis and suggestions in an IDE.

* Fix Pylint warning "Comparison to literal"

* .travis.yml: Fix/enhance pylint verification and Python compilation

donate-cpu-server.py is only Python 3 compatible, so it must be ignored
for pylint verification under Python 2.
All Python scripts that were verified with pylint under Python 2 are
now also verified with pylint under Python 3.

* donate-cpu-server.py: Add shebang and mark script as executable

* start_donate_cpu_server_test_local.sh: Directly execute server

Since the server script is executable now and has a shebang it can
be directly executed.

* Use Python 3.0 function annotations instead of comment type hints

Reference: https://www.python.org/dev/peps/pep-3107/
2019-10-26 21:10:21 +02:00
Daniel Marjamäki 575fa35ce2 daca@home: Use ftp server in germany instead of sweden, that is closer for most/all active clients 2019-10-26 17:47:42 +02:00
Sebastian 8fb794e731
libsigc++.cfg: Add configuration for library libsigc++ (#2291)
* libsigc++.cfg: Add configuration for library libsigc++

Reference: https://libsigcplusplus.github.io/libsigcplusplus/

* Make code compatible with libsigc++-2.0 instead of 3.0

Since Version 3.0 C++14 is required which is not (fully) supported in
some older GCC versions.
2019-10-26 17:37:14 +02:00
Maksim Derbasov 48012aceb4 test-my-pr.py: several improvements (#2294)
* test-my-pr.py: specify remote branch explicitly

When I merged (local) branch to master, `merge-base` returned me not valid commit hash.

* donate_cpu_lib.py: strip filename properly

* test-my-pr.py: reduced packages count; reduced output

* donate_cpu_lib.py: fix previous change
2019-10-24 21:54:22 +02:00
Maksim Derbasov 2500964b58 [tools] test-my-PR functionality (#2288)
* test my PR functionallity

* Improvement for test-my-pr script

* test-my-pr align master with branch
2019-10-23 09:12:15 +02:00
Daniel Marjamäki dc7cf10962 daca2-getpackages: update instructions 2019-10-19 18:49:58 +02:00
Maksim Derbasov a7a568d75a donate cpu server: added 2 commands (#2283) 2019-10-19 10:52:04 +02:00
Sebastian f3f00d1780
donate-cpu-server.py: Use "/var/daca@home" as work path by default. (#2281)
Fall back to "~/daca@home" if "/var/daca@home" does not exist.
Print the used work path when the script starts.
This way we do not have to change the server script before uploading
it to the server while being fully backwards compatible.
2019-10-18 20:04:50 +02:00
Sebastian c8e1ca7127
donate-cpu-server.py: Fix PEP8 issues (#2280) 2019-10-18 12:57:51 +02:00
versat cde08fb950 Remove accidentally added files 2019-10-18 12:53:25 +02:00
versat 094caf31ac std.cfg: Remove redundant configurations for vector::(push|pop)_back()
Add tests in std.cpp to verify that a configuration for the functions
exists.
2019-10-18 12:40:10 +02:00
Rikard Falkeborn 6e1c7e48b6 Donate cpu server crash locations (#2276)
donate-cpu-server: Print grouped stack traces in crash report

Example output:

	Packages: psi xenomai
	Token::hasKnownValue (this=0x0) at lib/token.h:988
	988	        return mImpl->mValues && std::any_of(mImpl->mValues->begin(), mImpl->mValues->end(), std::mem_fn(&ValueFlow::Value::isKnown));
	#0 Token::hasKnownValue (...) at lib/token.h:988
	#1 valueFlowReverse (...) at build/valueflow.cpp:3775
	#2 valueFlowBeforeCondition (...) at /usr/include/c++/8/bits/stl_list.h:301
	#3 ValueFlow::setValues (...) at build/valueflow.cpp:8403
	#4 Tokenizer::simplifyTokens1 (...) at build/tokenize.cpp:11095
	#5 CppCheck::checkFile (...) at build/cppcheck.cpp:513
	#6 CppCheck::check (...) at /usr/include/c++/8/bits/basic_string.h:936
	#7 CppCheckExecutor::check_internal (...) at cli/cppcheckexecutor.cpp:884
	#8 CppCheckExecutor::check (...) at cli/cppcheckexecutor.cpp:198
	#9 main (...) at cli/main.cpp:95

	Packages: broker
	valueFlowReverse (tokenlist=tokenlist@entry=0x7fffffffbce0, tok=tok@entry=0x555555cc9930, varToken=varToken@entry=0x555555cc9b70, val=..., val2=..., errorLogger=errorLogger@entry=0x7fffffffcb20, settings=0x7fffffffcd40) at build/valueflow.cpp:3775
	3775	                if (!assignTok->hasKnownValue()) {
	#0 valueFlowReverse (...) at build/valueflow.cpp:3775
	#1 valueFlowBeforeCondition (...) at build/valueflow.cpp:4092
	#2 ValueFlow::setValues (...) at build/valueflow.cpp:8406
	#3 Tokenizer::simplifyTokens1 (...) at build/tokenize.cpp:11095
	#4 CppCheck::checkFile (...) at build/cppcheck.cpp:513
	#5 CppCheck::check (...) at build/cppcheck.cpp:197
	#6 CppCheckExecutor::check_internal (...) at cli/cppcheckexecutor.cpp:884
	#7 CppCheckExecutor::check (...) at cli/cppcheckexecutor.cpp:198
	#8 main (...) at cli/main.cpp:95
2019-10-18 09:56:15 +02:00
Sebastian 478625c802
kde.cfg: Add KDE configuration and tests (#2278)
Reference: https://kde.org
2019-10-17 21:29:32 +02:00