aboutsummaryrefslogtreecommitdiff
path: root/clang/utils/analyzer/SATestBuild.py
AgeCommit message (Collapse)AuthorFilesLines
2024-09-26[analyzer] Moving TaintPropagation checker out of alpha (#67352)Daniel Krupp1-1/+1
This commit moves the **alpha.security.taint.TaintPropagation** and **alpha.security.taint.GenericTaint** checkers to the **optin.taint** optional package. These checkers were stabilized and improved by recent commits thus they are ready for production use.
2023-05-23[NFC][Py Reformat] Reformat python files in clang and clang-tools-extraTobias Hieta1-122/+176
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black`. If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. If you run into any problems, post to discourse about it and we will try to help. RFC Thread below: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Reviewed By: MatzeB Differential Revision: https://reviews.llvm.org/D150761
2021-10-01[analyzer] Fix deprecated plistlib functionsManas1-2/+4
It replaces the usage of readPlist,writePlist functions with load,dump in plistlib package. This fixes deprecation issues when analyzer reports are being generated outside of docker. Patch by Manas! Reviewed By: steakhal Differential Revision: https://reviews.llvm.org/D107312
2021-08-17[analyzer] Add option to SATest.py for extra checkersDeep Majumder1-0/+9
This patch adds the flag `extra-checkers` to the sub-command `build` for passing a comma separated list of additional checkers to include. Differential Revision: https://reviews.llvm.org/D106739
2020-07-14[analyzer][tests] Introduce analyzer benchmarking frameworkValeriy Savchenko1-36/+50
Summary: This commit includes a couple of changes: * Benchmark selected projects by analyzing them multiple times * Compare two benchmarking results and visualizing them on one chart * Organize project build logging, so we can use the same code in benchmarks Differential Revision: https://reviews.llvm.org/D83539
2020-07-10[analyzer][tests] Fix zip unpackingValeriy Savchenko1-1/+1
Differential Revision: https://reviews.llvm.org/D83374
2020-07-10[analyzer][tests] Measure peak memory consumption for every projectValeriy Savchenko1-25/+47
Differential Revision: https://reviews.llvm.org/D82967
2020-06-25[analyzer] SATest: Use logger in single-threaded mode as wellValeriy Savchenko1-19/+20
Summary: It generalizes the way the output looks across any -jN. Additionally it solves the buffering problems. Differential Revision: https://reviews.llvm.org/D81601
2020-06-25[analyzer] SATest: Add 5 more projects for testingValeriy Savchenko1-1/+1
Differential Revision: https://reviews.llvm.org/D81599
2020-06-16[analyzer] SATest: Add option to specify projects to testValeriy Savchenko1-7/+6
Differential Revision: https://reviews.llvm.org/D81569
2020-06-16[analyzer] SATest: Introduce a single entrypoint for regression scriptsValeriy Savchenko1-36/+3
Differential Revision: https://reviews.llvm.org/D81567
2020-06-16[analyzer] CmpRuns.py: Decouple main functionality from argparseValeriy Savchenko1-4/+4
Summary: It makes it much harder to use from other modules when one of the parameters is an argparse Namespace. This commit makes it easier to use CmpRuns programmatically. Differential Revision: https://reviews.llvm.org/D81566
2020-06-16[analyzer] SATest: Add posibility to download source from git and zipValeriy Savchenko1-59/+97
Differential Revision: https://reviews.llvm.org/D81564
2020-06-16[analyzer] SATest: Move from csv to json project mapsValeriy Savchenko1-86/+44
Summary: JSON format is a bit more verbose and easier to reason about and extend. For this reason, before extending SATestBuild functionality it is better to refactor the part of how we configure the whole system. Differential Revision: https://reviews.llvm.org/D81563
2020-06-16[analyzer] CmpRuns.py: Refactor and add type annotations. NFC.Valeriy Savchenko1-6/+7
Differential Revision: https://reviews.llvm.org/D80517
2020-05-28[analyzer] SATestBuild.py: Make verbosity level a cmd optionValeriy Savchenko1-13/+15
Reviewers: NoQ, dcoughlin Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, ASDenysPetrov, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80626
2020-05-22[analyzer] SATestBuild.py: Fix hang when one of the tasks failsValeriy Savchenko1-1/+1
Summary: Tasks can crash with many different exceptions including SystemExit. Bare except still causes a warning, so let's use BaseException instead. Differential Revision: https://reviews.llvm.org/D80443
2020-05-22[analyzer] SATestUtils.py: Refactor and add type annotationsValeriy Savchenko1-12/+16
Differential Revision: https://reviews.llvm.org/D80424
2020-05-22[analyzer] SATestBuild.py: Refactor and add type annotationsValeriy Savchenko1-537/+635
Summary: SATest scripts should be more python-style than they are now. This includes better architecture, type annotations, naming convesions, and up-to-date language features. This commit starts with two scripts SATestBuild and SATestAdd. Differential Revision: https://reviews.llvm.org/D80423
2020-05-19[analyzer] SATestBuild.py: Optionally override compilerValeriy Savchenko1-5/+8
Differential Revision: https://reviews.llvm.org/D80211
2020-05-15[analyzer] SATestBuild.py: Fix handling invalid plists after 2to3 conversion.Artem Dergachev1-2/+2
The updated plistlib throws a different exception class.
2020-05-14[analyzer] Modernize analyzer's Python scriptsValeriy Savchenko1-12/+15
Summary: Fix read/write in binary format, which crashes Python 3. Additionally, clean up redundant (as for Python 3) code and fix a handful of flake8 warnings. Differential Revision: https://reviews.llvm.org/D79932
2020-05-13[analyzer] SATestBuild.py: Be defensive against corrupt plist files.Artem Dergachev1-4/+9
2020-05-12[analyzer] SATestBuild.py: Fix support for #NOPREFIX.Artem Dergachev1-1/+4
Regressed in ec2d93c.
2020-05-11[analyzer] SATestBuild.py: Allow comments in run_static_analyzer.cmd.Artem Dergachev1-1/+1
Because those can get really weird sometimes.
2019-05-29[analyzer] SATestBuild.py: Use driver for analyzing single-file tests.Artem Dergachev1-10/+5
Don't bother coming up with a -cc1 run-line ourselves. This, in particular, gets rid of a macOS-specific code path. llvm-svn: 362009
2018-12-18Portable Python script across Python versionSerge Guelton1-2/+1
In Python3, dict.items, dict.keys, dict.values, zip, map and filter no longer return lists, they create generator instead. The portability patch consists in forcing an extra `list` call if the result is actually used as a list. `map` are replaced by list comprehension and `filter` by filtered list comprehension. Differential Revision: https://reviews.llvm.org/D55197 llvm-svn: 349501
2018-12-18Portable Python script across Python versionSerge Guelton1-7/+7
Using from __future__ import print_function it is possible to have a compatible behavior of `print(...)` across Python version. Differential Revision: https://reviews.llvm.org/D55213 llvm-svn: 349454
2018-12-13Portable Python script across Python versionSerge Guelton1-2/+5
Queue module as been renamed into queue in Python3 Differential Revision: https://reviews.llvm.org/D55202 llvm-svn: 349009
2018-12-03Portable Python script across Python versionSerge Guelton1-1/+1
Python2 supports the two following equivalent construct raise ExceptionType, exception_value and raise ExceptionType(exception_value) Only the later is supported by Python3. Differential Revision: https://reviews.llvm.org/D55195 llvm-svn: 348126
2018-10-02[analyzer] [tests] Hotfix: missing spaceGeorge Karpenkov1-1/+1
llvm-svn: 343643
2018-10-02[analyzer] [tests] Allow specifying entire -analyze-config on the command ↵George Karpenkov1-14/+16
line, make sure it's always propagated Differential Revision: https://reviews.llvm.org/D52801 llvm-svn: 343636
2018-09-27[analyzer] [testing] Pass through an extra argument for specifying extra ↵George Karpenkov1-16/+22
analyzer options Differential Revision: https://reviews.llvm.org/D52585 llvm-svn: 343158
2018-07-30[analyzer] [tests] Style fixes for testing harness.George Karpenkov1-9/+9
llvm-svn: 338322
2018-07-02[analyzer] [tests] Pass clang executable path to prefix-less executor scripts.George Karpenkov1-0/+1
llvm-svn: 336124
2018-06-29[analyzer] [tests] Allow the tested project to specify it's own analyzer wrapperGeorge Karpenkov1-0/+14
llvm-svn: 336023
2018-06-29[analyzer] [tests] Fix 80 column violation in SATestBuild.pyGeorge Karpenkov1-5/+5
llvm-svn: 336022
2018-06-27[analyzer] Fix string not being formatted with extra argumentsMikhail R. Gadelha1-1/+2
Signed-off-by: Mikhail Ramalho <mikhail.ramalho@gmail.com> llvm-svn: 335739
2018-06-26[analyzer] [tests] Include statistics in tests.George Karpenkov1-1/+7
llvm-svn: 335685
2018-03-29[analyzer] [testing] Be less verbose by default in integration testing.George Karpenkov1-1/+1
llvm-svn: 328752
2018-02-13[analyzer] [tests] Update CmpRuns to write to stdout correctly in ↵George Karpenkov1-1/+3
multithreaded environment llvm-svn: 325070
2018-02-12[analyzer] [tests] Fix a typo in analyzer testing script.George Karpenkov1-1/+1
Incorrect option instance construction. llvm-svn: 324946
2018-02-09[analyzer] [tests] [NFC] Remove a fragile tightly-coupled component ↵George Karpenkov1-1/+2
emulating parser output ...when we can just use the real parser instead. Differential Revision: https://reviews.llvm.org/D43098 llvm-svn: 324759
2018-02-08[analyzer] [tests] Test different projects concurrentlyGeorge Karpenkov1-65/+175
Differential Revision: https://reviews.llvm.org/D43031 llvm-svn: 324652
2018-01-29[analyzer] Use stable filenames in analyzer testing infrastructureGeorge Karpenkov1-0/+1
Makes finding the right file in test results easier. Differential Revision: https://reviews.llvm.org/D42445 llvm-svn: 323697
2017-10-30[analyzer] [tests] Remove empty folders in reference results, do not store ↵George Karpenkov1-4/+12
diffs.txt Storing diffs.txt is now redundant, as we simply dump the CmpRuns output to stdout (it is saved in CI and tends to be small). Not generating those files enables us to remove empty folders, which confuse git, as it would not add them with reference results. llvm-svn: 316948
2017-10-27[Analyzer] [Tests] Fixing typo from the previous commit.George Karpenkov1-1/+1
Can not open a non-existent file with r+. llvm-svn: 316808
2017-10-27[Analyzer] [Tests] Dump the output of scan-build to stdout on failure.George Karpenkov1-5/+6
Eliminates extra lookup step during debugging. llvm-svn: 316806
2017-10-26[Analyzer] [Tests] Write analyzers crashes to stdout, and not to a separate fileGeorge Karpenkov1-20/+12
With this change it would be sufficient to look at CI console to see the failure. llvm-svn: 316687
2017-10-26[Analyzer] [Tests] Consistently use exit codes. Use code=42 to signify ↵George Karpenkov1-8/+11
different results llvm-svn: 316632