Commit Graph

5 Commits

Author SHA1 Message Date
Oliver Stöneberg bc58f55c6e
donate-cpu: greatly improved `LibraryIncludes.get_libraries()` performance / some optimizations and cleanups (#4273)
* 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
Georgiy Komarov 81eabb5f61
addons: Fix arguments parser when running pytest (#3327) 2021-07-06 22:13:04 +02:00
Sebastian fb96e5433a
y2038 addon: Fix that check can never return True, add tests (#2417)
* y2038 addon: Fix that check can never return True, add tests

At the beginning of `check_y2038_safe()` the variable `y2038safe` should
be initialized with `True` and only be set to `False` if there are any
issues. Otherwise it could never become `True`.
In the unit tests the return value of `check_y2038_safe()` is now
verified. But it does not yet work for the "good" example. The "good"
example also returns `False` since it finds warnings in the include
file. So this verification is marked with a "FIXME" comment.

* y2038 tests: Add "good" test file that does not use time functionality

The test file y2038-test-5-good-no-time-used.c does not use any time
functionality so the y2038 addon is not allowed to issue any warnings
and the check must return with `True` (code is safe).
2019-12-03 18:49:11 +01:00
versat dc1cdd2b76 addons/test/test-*.py: Improve documentation about running the tests 2019-09-20 13:39:38 +02:00
Georgy Komarov fbd7b5180b Update addons structure. Make Y2038 addon works. (#2024)
* Update addons structure. Make Y2038 addon works.

All addons are now located in same directory, where cppcheck-gui is
looking for them.

Y2038 addon has been updated to latest cppcheck version. Output is same
as 303622f01c commit as it described in
README: 303622f01c/addons/y2038/README.

* Clean up .travis.yml

* Update travis.yml paths.

* misra.py: Bring back -P argument for backward compatibility

* Fix paths

* Normalize dumpfile paths tpo cppcheck format

* Fixup 3 test.

* Add arguments regression test.

* Fixing travis build
2019-07-26 06:38:03 +02:00