Commit graph

267 commits

Author SHA1 Message Date
Simon Butcher 8eb64e6895 Fix output_env.sh for varying pylint3 output
`pylint3 --version` will output to stderr the status of the config file it's
using. This can be "No config file found" or "Using config file" or nothing.
This means the pylint version may or may not be on the first line.

Therefore this commit changes the filters on the pylint3 version output to first
strip out the config line, and then to select only the pylint line.

Signed-off-by: Simon Butcher <simon.butcher@arm.com>
2020-03-06 19:34:41 +00:00
Simon Butcher 8277041108 Add Python, Perl and Pylint to output_env.sh
Add the versions of Python, Perl, and Pylint to the version dump provided by
the output_env.sh script.

Signed-off-by: Simon Butcher <simon.butcher@arm.com>
2020-03-06 19:34:22 +00:00
Simon Butcher d40e603afc Make minor fixes to output_env.sh after review
A number of clean-up improvements following review.
 * removal of redundant `` quotes
 * removal of non-portable echo "\n", in favour of additional echo commands
 * change to use of uname to detemine if the platform is Linux or not
 * revised formatting of output
 * change to dpkg-query from dpkg to find installed libasan variants

Co-Authored-By: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Simon Butcher <simon.butcher@arm.com>
2020-03-04 11:40:08 +00:00
Simon Butcher 870ee827ac Enhance the output_env.sh script
This commit adds additional information to the output_env.sh script of:
  * Linux distribution version (if available)
  * GDB version (if available)

It also makes some information clearer:
  * the type of OpenSSL/GNUTLS version (legacy/default)
  * and whether certain versions are not installed, or not configured

And it simplifies the error messages for absent tools.

Signed-off-by: Simon Butcher <simon.butcher@arm.com>
2020-03-04 11:39:18 +00:00
Hanno Becker 19aa89ad47 Don't set MBEDTLS_MEMORY_DEBUG through scripts/config.pl full 2019-09-09 07:21:40 -04:00
Andrzej Kurek e1c62e6641 Update documentation of exceptions for config.pl full 2019-09-09 07:12:31 -04:00
Hanno Becker 26c333ac01 Disable memory buffer allocator in full config
This commit modifies `config.pl` to not set MBEDTLS_MEMORY_BUFFER_ALLOC
with the `full` option.
2019-09-09 06:34:30 -04:00
Darryl Green e3a7c9c081 Change worktree_rev to HEAD for rev-parse
Due to how the checking script is run in docker, worktree_rev is
ambiguous when running rev-parse. We're running it in the checked
out worktree, so we can use HEAD instead, which is unambiguous.
2019-07-25 14:40:00 +01:00
Gilles Peskine b14b7305c6 Split _abi_compliance_command into smaller functions
This makes the code easier to read and pacifies pylint.
2019-07-05 17:06:42 +02:00
Gilles Peskine 2b3f1346ef Record the commits that were compared
Record the commit ID in addition to the symbolic name of the version
being tested. This makes it easier to figure out what has been
compared when reading logs that don't always indicate explicitly what
things like HEAD are.

This makes the title of HTML reports somewhat verbose, but I think
that's a small price to pay.
2019-07-05 17:06:42 +02:00
Gilles Peskine cc02658d27 Document how to build the typical argument for -s 2019-07-05 17:06:42 +02:00
Gilles Peskine 16dfdb3539 Allow running /somewhere/else/path/to/abi_check.py
Don't require abi_check.py to be the one in scripts/ under the current
directory.
2019-07-05 17:06:42 +02:00
Jaeden Amero a33bb945eb windows: Fix Release x64 configuration
Inherit PlatformToolset from the project configuration. This allow the
project to configure PlatformToolset, and aligns the Release x64 build
with other build types.

Fixes #1430
2019-06-20 16:30:35 +01:00
Jaeden Amero d03977dc3c Merge remote-tracking branch 'origin/pr/2677' into mbedtls-2.7
* origin/pr/2677:
  Show removed symbols in abi check
2019-06-14 08:54:35 +01:00
Darryl Green db95d7e99d Show removed symbols in abi check 2019-06-05 12:59:07 +01:00
Darryl Green 3e9626ea32 Remove all abi dumps, not just ones shared between versions
While the abi-checking script handled comparing only the modules
that were shared between the old and new versions correctly, the
cleanup of the abi dumps only removed what was shared. Change the
cleanup logic to remove all abi dumps instead.
2019-05-29 13:40:54 +01:00
Darryl Green 8194871075 Only use submodule if present
Enabling the USE_CRYPTO_SUBMODULE option causes problems if the
crypto submodule isn't present. For example, when building
mbed-crypto as a submodule, it should use error.c from the parent
project if USE_CRYPTO_SUBMODULE is set. However if the parent
project isn't present, then the build will fail. Only enable it
if the submodule actually exists.
2019-05-09 13:25:56 +01:00
Darryl Green 62a18e32d0 Add documentation for why we're catching all exceptions
We wish to distinguish between success, an abi break and a script
failure, so catch all uncaught exceptions and exit explicitly
with status 2
2019-04-18 16:25:56 +01:00
Darryl Green 4a483e4829 Use check_output instead of Popen 2019-04-18 11:51:49 +01:00
Darryl Green 31a1e99874 Start unused variable with underscore 2019-04-18 11:51:49 +01:00
Darryl Green bbc6ccfa2f Correct documentation 2019-04-18 11:51:49 +01:00
Darryl Green 03625fe311 Check that the report directory is a directory 2019-04-18 11:51:49 +01:00
Darryl Green f1d272d0ca Use namespaces instead of full classes 2019-04-18 11:51:49 +01:00
Darryl Green b7447e7d2a Fix pylint issues 2019-04-18 11:51:49 +01:00
Darryl Green cf43425941 Don't put abi dumps in subfolders 2019-04-18 11:51:49 +01:00
Darryl Green f0f9f7fe7d Add verbose switch to silence all output except the final report 2019-04-18 11:51:49 +01:00
Darryl Green b743309c00 Fetch the remote crypto branch, rather than cloning it 2019-04-18 11:51:49 +01:00
Darryl Green 7bb9cb5ce3 Prefix internal functions with underscore 2019-04-18 11:51:49 +01:00
Darryl Green 02b6865dc7 Add RepoVersion class to make handling of many arguments easier
There are a number of arguments being passed around, nearly all of
which are duplicated between the old and new versions. Moving these
into a separate class should hopefully make it simpler to follow
what is being done.
2019-04-18 11:51:49 +01:00
Darryl Green 7be79c9e77 Reduce indentation levels 2019-04-18 11:51:49 +01:00
Darryl Green 765d20d3d8 Improve documentation 2019-04-18 11:51:49 +01:00
Darryl Green 826e5af85d Use optional arguments for setting repositories 2019-04-18 11:51:49 +01:00
Darryl Green 997c287ce9 Only build the library
We only need the .so files, so only build the library
2019-04-18 11:51:49 +01:00
Darryl Green 87aedf6202 Add ability to compare submodules from different repositories
As before with wanting to compare revisions across different
repositories, the ability to select the crypto submodule from a
different repository is useful.
2019-04-18 11:51:49 +01:00
Darryl Green d98d8b50dc Add handling for cases when not all .so files are present
We may wish to compare ABI/API between Mbed TLS and Mbed Crypto,
which will cause issues as not all .so files are shared. Only
compare .so files which both libraries have.
2019-04-18 11:51:49 +01:00
Darryl Green d9ad9ec81c Extend functionality to allow setting crypto submodule version
As going forward we will have Crypto in a submodule, we will need to
be able to check ABI compatibility between versions using different
submodule versions. For TLS versions that support the submodule, we
will always build using the submodule.

If the Crypto submodule is used, libmbedcrypto.so is not in the main
library folder, but in crypto/library instead. Given this, the script
searches for *.so files and notes their path, in order to create the
dumps correctly.
2019-04-18 11:51:49 +01:00
Darryl Green ab3893b815 Simplify logic for checking if report folder can be removed 2019-04-18 11:51:49 +01:00
Darryl Green 32e7a50c82 Add option for a brief report of problems only 2019-04-18 11:51:49 +01:00
Darryl Green d3cde6f2d3 Add option to skip identifiers in ABI checks
By default abi-compliance-checker will check the entire ABI/API.
There are internal identifiers that we do not promise compatibility
for, so we want the ability to skip them when checking the ABI/API.
2019-04-18 11:51:49 +01:00
Darryl Green 834ebc415c Extend abi-checking to different repos 2019-04-18 11:51:49 +01:00
Gilles Peskine fceb4ce767 abi_check.py: Document more methods 2019-04-18 11:51:38 +01:00
Jaeden Amero 346f9595c9 abi_check: Update submodules
When grabbing a fresh copy of a branch, it's required to also fetch the
submodule. Add fetching the submodule to abi_check.py.
2019-04-18 11:40:21 +01:00
Jaeden Amero 5857c2f43f abi_check: Allow checking current checkout
Without a "--detach" option, git worktree will refuse to checkout a branch
that's already checked out. This makes the abi_check.py script not very
useful for checking the currently checked out branch, as git will error
that the branch is already checked out. Add the "--detach" option to check
out the new temporary worktree in detached head mode. This is acceptable
because we aren't planning on working on the branch and just want a
checkout to do ABI checking from.
2019-04-18 11:40:21 +01:00
Darryl Green 31321ca893 Fix minor issues with command line options 2019-04-18 11:40:21 +01:00
Darryl Green 4cd7a9b8ed Updated abi_check.py docstrings 2019-04-18 11:40:21 +01:00
Darryl Green c47ac2651a Fix current directory check 2019-04-18 11:40:21 +01:00
Darryl Green e3e6b18351 Add copyright to abi_check script 2019-04-18 11:40:21 +01:00
Darryl Green 3da1504229 Add script for ABI compatibility checking 2019-04-18 11:40:21 +01:00
Andres Amaya Garcia 21ade06ef8 Reduce priority of 3DES ciphersuites 2019-02-13 09:52:46 +00:00
Simon Butcher f15cfd5d04 Merge remote-tracking branch 'public/pr/1557' into mbedtls-2.7 2018-06-27 11:07:50 +01:00