Commit Graph

92 Commits

Author SHA1 Message Date
Daniel Marjamäki 2932ab7592
Revert "Fixed (suppressing critical error, no indication to user that analysis of file fails) ()" ()
This reverts commit 7c316fb76d.
2023-12-17 19:13:14 +01:00
Daniel Marjamäki 1c7036f174
daca@home: update client version [ci skip] () 2023-12-17 16:38:52 +01:00
Daniel Marjamäki e7d0bb0009
daca@home: If cppcheck binary does not handle --unsafe-exitcode then execute without it [ci skip] () 2023-12-17 16:33:00 +01:00
Daniel Marjamäki 150ca20404
daca@home: use --unsafe-exitcode ()
the daca script will think that analysis crashed otherwise.
2023-12-17 16:11:38 +01:00
Oliver Stöneberg 57bec6cbc8
fixed - daca: missing diff entries ()
This reverts 7ff58dacff.
2023-11-01 22:58:33 +01:00
Oliver Stöneberg 309b4d8501
donate-cpu: some small improvements ()
- added timing information to "finished" log message in `scan_package()`
- adjusted some log messages
- avoid unnecessary `git checkout` invocation if non-`main` binary
already exists
2023-10-23 12:53:34 +02:00
Oliver Stöneberg d757f8b8fc
fixed - donate_cpu_lib.py: removed `--showtime=none` option not supported by the previous version () 2023-10-10 11:53:46 +02:00
Oliver Stöneberg fc700b68eb
refs / refs - improved `--showtime=` behavior and testing ()
This is a step onto leveraging the `ThreadExecutor` implementation for
`ProcessExecutor` which is a follow-up to . We need to have the
proper test coverage and the existing implementations working as
expected before we move to the shared code.

Fixes:
- added `--showtime=` tests for all executor implementations
- only print `--showtime=summary` once at the end
- prevents `--showtime=` by multiple threads to be written at the same
time - essentially breaking the output
- reset the timer results before each test
- deprecated `top5` in favor of `top5_file`
- fixed printing for all executors except `ProcessExecutor`
2023-10-05 19:04:06 +02:00
Oliver Stöneberg e6e273645d
donate_cpu_lib.py: increased the amount of upload tries () 2023-09-22 19:41:52 +02:00
Oliver Stöneberg 51d1758720
fixed (Create daca report for `valueFlowBailoutIncompleteVar`) ()
This provides a report of the top incomplete variables reported by the
ValueFlow analysis. This is based on the implementation of the existing
`--check-library` reports.
2023-09-08 18:08:44 +02:00
Oliver Stöneberg 4aae670b45
donate-cpu: fixed (donate-cpu: Improve library detection) / respect `--no-upload` in "nodata" uploads ()
We were only matching each library once as the entry was removed from
the container stored in the class as we did not modify a copy but a
reference.
2023-08-04 10:30:58 +02:00
Daniel Marjamäki 682bdd3e53
Fix (daca: script crashes (UnicodeDecodeError) when checking package lgeneral) () 2023-07-04 19:17:26 +02:00
Daniel Marjamäki 7ff58dacff
daca: filter checker results when there are syntaxError/unknownMacro/etc () 2023-07-04 13:23:19 +02:00
Oliver Stöneberg 30131837b5
refs - deprecated `--enable=information` implicitly enabling `missingInclude` () 2023-03-09 20:04:20 +01:00
Oliver Stöneberg 20ff2d7172
donate_cpu_lib.py: use `subprocess.check_call()` so failed calls will actually raise an exception () 2023-02-07 21:42:37 +01:00
Rikard Falkeborn 9acc9659aa
test-my-pr robustification ()
* Add try_retry-logic to get_packages_count()

Occasionally, get_packages_count() fails, which is a bit annoying since
it happens after compilation and therefore can take some time to detect.
Add try-retry to the function to make it more robust.

* Move try_retry-logic to lib.get_package()

Moving it to the library means test-my-pr also benefits from it. This
fixes Trac ticket .
2023-01-31 22:39:55 +01:00
Oliver Stöneberg c2de9843ca
donate_cpu_lib.py: use `try_retry()` in `__remove_tree()` () 2023-01-18 17:02:09 +01:00
Oliver Stöneberg d8451eda5f
donate-cpu: fixed interrupted `main` branch compilation () 2022-12-18 19:50:22 +01:00
Oliver Stöneberg 67f46b7353
donate-cpu: avoid unnecessary build invocation for `main` () 2022-11-28 20:49:05 +01:00
Oliver Stöneberg f6c2afa2ea
fix - donate-cpu: collect and avoid packages with no files to process () 2022-11-23 19:13:54 +01:00
Oliver Stöneberg a7dde5d470
donate-cpu: improved client stability by consistently re-trying remote calls / cleanups () 2022-11-20 14:47:19 +01:00
Oliver Stöneberg 12afb9bbf4
cleaned up global `donate_cpu_lib.py` configuration variables () 2022-10-06 20:49:47 +02:00
Oliver Stöneberg 21db0b98a6
donate-cpu: small `LibraryIncludes` regular expression improvements / fixed/improved tests ()
* test_donate_cpu_lib.py: added more tests

* test_donate_cpu_lib.py: fixed non-working assert

* donate_cpu_lib.py: use `\t` in `LibraryIncludes` regular expressions instead of an actual TAB character

* donate_cpu_lib.py: bumped version

* donate_cpu_lib.py: use non-capturing group in `LibraryIncludes` regular expressions
2022-09-16 18:59:53 +02:00
Oliver Stöneberg 76244de640
daca: add checkLibraryCheckType report / bumped client version () 2022-09-15 20:21:40 +02:00
Oliver Stöneberg a556cc3863
donate-cpu: collect some `--debug-warnings` () 2022-09-09 20:56:14 +02:00
Daniel Marjamäki 7bb2bd3ca0 test-my-pr: add option --c-only 2022-09-05 11:33:32 +02:00
Oliver Stöneberg 9d107d911b
fixed (donate-cpu: Improve library detection) () 2022-08-30 18:08:02 +02:00
Oliver Stöneberg cee04f4ee5
donate-cpu: fixed `make` build / cleanups () 2022-08-25 22:20:30 +02:00
Oliver Stöneberg 9cd9afa1b6
donate-cpu: added support for `mingw32-make` and improved support for `msbuild.exe` () 2022-08-21 17:08:58 +02:00
Oliver Stöneberg 30b20d17cb
donate-cpu: some cleanups ()
* donate_cpu_lib.py: bumped version

* donate-cpu.py: replaced `version.StrictVersion` from deprecated `distutils` with `version.Version` from `packaging`

* donate_cpu_lib.py: omit `-rp=` from `cppcheck-options`

* donate-cpu.py: use `get_client_version()` instead of constant
2022-07-19 07:52:23 +02:00
Oliver Stöneberg 7ee450ed21
donate-cpu.py: fixed stupid mistakes in client version update notification () 2022-07-18 23:10:33 +02:00
Oliver Stöneberg cc9c5a2768
donate-cpu.py: added `--version` and show a message when a newer client is available () 2022-07-18 16:24:04 +02:00
Oliver Stöneberg bc58f55c6e
donate-cpu: greatly improved `LibraryIncludes.get_libraries()` performance / some optimizations and cleanups ()
* donate_cpu_lib.py: use `os.path.join()`

* donate-cpu: removed remaining usage of `os.chdir()`

* donate_cpu_lib.py: moved library includes code into class

* donate_cpu_lib.py: pre-compile library include regular expressions

* donate_cpu_lib.py: pre-compile some more regular expressions

* donate_cpu_lib.py: small unpack_package() cleanup and optimization

* donate_cpu_lib.py: added some information about the extracted files to unpack_package()

* donate_cpu_lib.py: bumped version

* added test_donate_cpu_lib.py

* donate_cpu_lib.py: greatly improved `LibraryIncludes.get_libraries()` performance

only scan each file once for previously undetected libraries only

* test_donate_cpu_lib.py: fix for Python 3.5

* scriptcheck.yml: added `-v` to pytest calls so we get the complete diff on assertions

* fixed `test_arguments_regression()` Python tests with additional pytest arguments

* donate_cpu_lib.py: use `subprocess.check_call()`

* test_donate_cpu_lib.py: sort results to address differences in order with Python 3.5
2022-07-13 21:09:29 +02:00
Oliver Stöneberg 1d9b6e1aac
donate-cpu: fixed library detection () 2022-07-12 19:39:07 +02:00
orbitcowboy 6f303ce61c daca@home: Set '--inline-suppr' flag. 2022-06-21 16:18:12 +02:00
Daniel Marjamäki 31560299f8 donate-cpu: skip torture test file 2022-05-20 23:20:16 +02:00
orbitcowboy a6b8bb5950 donate_cpu: Added '<sys/uio.h>' to bsd include list. 2022-04-26 09:46:18 +02:00
chrchr-github bd9f5231b8
Fix FP divideSizeof with dereferenced pointer-to-pointer () 2022-04-10 22:47:27 +02:00
Oliver Stöneberg dcaff3b635
donate_cpu_lib.py: some cleanups () 2022-03-21 18:46:19 +01:00
Oliver Stöneberg 469575cb21
donate_cpu_lib.py: actually make compile_cppcheck() fail when the build fails / some cleanups () 2022-03-19 20:06:11 +01:00
Oliver Stöneberg d3ba5a0829
donate-cpu.py: added "--packages" parameter to specify a list of packages to process () 2022-02-14 12:59:38 +01:00
Rikard Falkeborn d105f3b05f
Minor improvements to package selection in test-my-pr/donate-cpu () 2022-01-26 11:36:58 +01:00
guillaume-uH57J9 dfd22919bc
donate_cpu_lib.py: fix callstack capture, fix dependency check ()
* donate_cpu_lib.py: fix callstack capture, fix dependency check

check_requirements: verify that module psutil is available. 
scan_package: collect crash callstack regardless of cppcheck_path and cppcheck version

* donate_cpu_lib.pu: remove debug code

* donate_cpu_lib.py: add parameter capture_callstack
2022-01-02 22:16:00 +01:00
guillaume-uH57J9 a3560aaf5a
Better git usage in donate-cpu.py to reduce bandwidth and disk usage ()
* Better git usage in donate-cpu.py to reduce bandwidth and disk usage

Main changes:
* Bump client version
* Move try+retry logic to function try_retry to reduce duplication
* Use exponential backoff for try_retry
* git clone with --depth=1 to reduce bandwidth and disk use
* Use multiple worktree to work with multiple versions, instead of back-and-forth checkouts

* donate-cpu.py fixes for review comments and automated check failures

* Move compile_cppcheck within (if ver == 'main) branch to avoid duplicate compile_cppcheck+compile_version cals
* Use classic format syntax for python 3.5 compatibility
* Fix undefined CalledProcessError detected by pylint

* donate-cpu.py code changes following code review

* Migration existing "cppcheck" directory if available instead of "git clone"
* Logging message tweaks
* Use subprocess' cwd parameter instead of os.chdir() to avoid risk around changing and not restoring the working directory

* Update tools/test-my-pr.py to account for donate_cpu_lib changes

* donate-cpu.py: ensure correct workspace locations with relative --work-path
2021-12-19 18:52:36 +01:00
Oliver Stöneberg 7004ceb691
donate_cpu_lib.py: fixed detection of ThreadExecutor error () 2021-10-24 11:02:51 +02:00
Oliver Stöneberg 48d5f47e73
Fix (donate_cpu_lib.py: fixed stupid error in lookup of signal in internal error) () 2021-10-13 14:51:56 +02:00
Oliver Stöneberg 85b02e4ecb
Fix (improved signal detection daca@home client) / also optimized stack trace generation () 2021-10-11 19:07:19 +02:00
Oliver Stöneberg 3f8e523c71
donate_cpu_lib.py: some cleanups () 2021-10-09 14:51:24 +02:00
Alfi Maulana aab5b39e2d
feat: add support for .ipp and .ixx extensions () 2021-08-09 10:46:56 +02:00
Oliver Stöneberg f8edb7b6e6
various daca@home client cleanups () 2021-03-06 12:34:12 +01:00