Commit Graph

32 Commits

Author SHA1 Message Date
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
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
Darryl Green
418527b041 Fix minor issues with command line options 2018-04-16 12:02:29 +01:00
Darryl Green
7869680e41 Updated abi_check.py docstrings 2018-04-06 11:23:22 +01:00
Darryl Green
a6f430f577 Fix current directory check 2018-03-15 13:53:58 +00:00
Darryl Green
127c5affce Add copyright to abi_check script 2018-03-13 09:17:23 +00:00
Darryl Green
7c2dd5890f Add script for ABI compatibility checking 2018-03-09 17:33:32 +00:00