Commit Graph

291 Commits

Author SHA1 Message Date
Gilles Peskine
47a4cba1db Split _abi_compliance_command into smaller functions
This makes the code easier to read and pacifies pylint.
2019-07-05 17:06:19 +02:00
Gilles Peskine
ea94391500 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:19 +02:00
Gilles Peskine
826286a04e Document how to build the typical argument for -s 2019-07-05 17:06:19 +02:00
Gilles Peskine
c53b93b8ef 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:19 +02:00
Jaeden Amero
73a36ff512 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:34:22 +01:00
Jaeden Amero
342223e72c Merge remote-tracking branch 'origin/pr/2676' into mbedtls-2.16
* origin/pr/2676:
  Show removed symbols in abi check
2019-06-14 08:54:50 +01:00
Darryl Green
0ae1a53e32 Show removed symbols in abi check 2019-06-05 12:58:40 +01:00
Darryl Green
e831f5575b 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:19 +01:00
Darryl Green
fbf3c8ac23 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:26 +01:00
Darryl Green
a0415bc779 Use check_output instead of Popen 2019-04-18 11:47:28 +01:00
Darryl Green
03c5e856e8 Start unused variable with underscore 2019-04-18 11:47:28 +01:00
Darryl Green
3c9e7d23b1 Correct documentation 2019-04-18 11:47:28 +01:00
Darryl Green
6b3cbfa370 Check that the report directory is a directory 2019-04-18 11:47:28 +01:00
Darryl Green
30dc6d5bb9 Use namespaces instead of full classes 2019-04-18 11:47:28 +01:00
Darryl Green
26dff8e68d Fix pylint issues 2019-04-18 11:47:28 +01:00
Darryl Green
5783847c63 Don't put abi dumps in subfolders 2019-04-18 11:47:28 +01:00
Darryl Green
6602538544 Add verbose switch to silence all output except the final report 2019-04-18 11:47:28 +01:00
Darryl Green
3f742987b8 Fetch the remote crypto branch, rather than cloning it 2019-04-18 11:47:28 +01:00
Darryl Green
88bfbc2deb Prefix internal functions with underscore 2019-04-18 11:47:28 +01:00
Darryl Green
7381bea6be 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:47:28 +01:00
Darryl Green
0478a32162 Reduce indentation levels 2019-04-18 11:47:28 +01:00
Darryl Green
7c0e052276 Improve documentation 2019-04-18 11:47:28 +01:00
Darryl Green
06c51d0470 Use optional arguments for setting repositories 2019-04-18 11:47:28 +01:00
Darryl Green
c8e6ad4ace Only build the library
We only need the .so files, so only build the library
2019-04-18 11:47:28 +01:00
Darryl Green
879f2509dc 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:47:28 +01:00
Darryl Green
de118091f2 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:47:28 +01:00
Darryl Green
ae5d66c612 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:47:28 +01:00
Darryl Green
131e24b1b5 Simplify logic for checking if report folder can be removed 2019-04-18 11:47:28 +01:00
Darryl Green
0da4578fae Add option for a brief report of problems only 2019-04-18 11:47:28 +01:00
Darryl Green
668063bca2 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:47:28 +01:00
Darryl Green
5a301f0868 Extend abi-checking to different repos 2019-04-18 11:47:28 +01:00
Jaeden Amero
4cd4b4bf83 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:44:32 +01:00
Jaeden Amero
9ef6028da0 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:44:32 +01:00
Jaeden Amero
db8821cb7e Merge remote-tracking branch 'origin/pr/2470' into mbedtls-2.16
* origin/pr/2470:
  Silence pylint
  check-files.py: readability improvement in permission check
  check-files.py: use class fields for class-wide constants
  check-files.py: clean up class structure
  abi_check.py: Document more methods
  check-files.py: document some classes and methods
  Fix pylint errors going uncaught
  Call pylint3, not pylint
  New, documented pylint configuration
2019-04-05 14:20:00 +01:00
Andres Amaya Garcia
5d8aade01d Reduce priority of 3DES ciphersuites 2019-03-01 10:29:13 +01:00
Gilles Peskine
afd19dd9b6 Silence pylint
Silence pylint in specific places where we're doing slightly unusual
or dodgy, but correct.
2019-02-25 21:42:32 +01:00
Gilles Peskine
9df176320e abi_check.py: Document more methods 2019-02-25 21:42:32 +01:00
Andres Amaya Garcia
4c47e18cfa Fix check-generated-files.sh failure with query_config 2019-02-07 10:32:31 +00:00
Andres Amaya Garcia
c6753cd4cd Use \r instead of 0xD in generate_visualc_files.pl 2019-02-07 10:32:31 +00:00
Andres Amaya Garcia
fe52d2af51 Update query_config.c with new macros 2019-02-07 10:32:31 +00:00
Andres Amaya Garcia
4eb040af4a Exclude macros from query_config.c generation 2019-02-07 10:32:31 +00:00
Andres Amaya Garcia
c500ad8cc0 Fix query_config macro expansion for windows 2019-02-07 10:32:31 +00:00
Andres Amaya Garcia
c46ea38f90 Fix query_config macro expansion for windows 2019-02-07 10:32:31 +00:00
Andres Amaya Garcia
024694e7d5 Fix missing include in vs proj files for query programs 2019-02-07 10:32:31 +00:00
Andres Amaya Garcia
5547a405b2 Improve comments in query_config.fmt 2019-02-07 10:32:31 +00:00
Andres Amaya Garcia
d2689e3876 Fix GCC 0-length printf format string error 2019-02-07 10:32:31 +00:00
Andres Amaya Garcia
289c64ab30 Fix multiple stdio.h inclusion in query_config.c 2019-02-07 10:32:31 +00:00
Andres Amaya Garcia
e8b11dd98b Fix typo in quenerate_query_config.pl comment 2019-02-07 10:32:31 +00:00
Andres Amaya Garcia
e144b4130c Add gen_query_config.pl to check-gen-files and bump_version 2019-02-07 10:32:31 +00:00
Andres Amaya Garcia
f1a5b26233 Script generation of query_config.c file 2019-02-07 10:32:31 +00:00