mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Merge pull request #9094 from davidhorstmann-arm/move-mbedtls-dev-to-framework
Move `mbedtls_dev` to framework submodule
This commit is contained in:
@ -29,8 +29,8 @@ from cryptography import x509
|
||||
from generate_test_code import FileWrapper
|
||||
|
||||
import scripts_path # pylint: disable=unused-import
|
||||
from mbedtls_dev import build_tree
|
||||
from mbedtls_dev import logging_util
|
||||
from mbedtls_framework import build_tree
|
||||
from mbedtls_framework import logging_util
|
||||
|
||||
def check_cryptography_version():
|
||||
match = re.match(r'^[0-9]+', cryptography.__version__)
|
||||
|
@ -31,14 +31,14 @@ EOF
|
||||
|
||||
can_pylint () {
|
||||
# Pylint 1.5.2 from Ubuntu 16.04 is too old:
|
||||
# E: 34, 0: Unable to import 'mbedtls_dev' (import-error)
|
||||
# E: 34, 0: Unable to import 'mbedtls_framework' (import-error)
|
||||
# Pylint 1.8.3 from Ubuntu 18.04 passed on the first commit containing this line.
|
||||
check_version pylint 1.8.3
|
||||
}
|
||||
|
||||
can_mypy () {
|
||||
# mypy 0.770 is too old:
|
||||
# tests/scripts/test_psa_constant_names.py:34: error: Cannot find implementation or library stub for module named 'mbedtls_dev'
|
||||
# tests/scripts/test_psa_constant_names.py:34: error: Cannot find implementation or library stub for module named 'mbedtls_framework'
|
||||
# mypy 0.780 from pip passed on the first commit containing this line.
|
||||
check_version mypy.version 0.780
|
||||
}
|
||||
@ -55,14 +55,14 @@ elif [ "$1" = "--can-mypy" ]; then
|
||||
fi
|
||||
|
||||
echo 'Running pylint ...'
|
||||
$PYTHON -m pylint scripts/mbedtls_dev/*.py scripts/*.py tests/scripts/*.py || {
|
||||
$PYTHON -m pylint framework/scripts/mbedtls_framework/*.py scripts/*.py tests/scripts/*.py || {
|
||||
echo >&2 "pylint reported errors"
|
||||
ret=1
|
||||
}
|
||||
|
||||
echo
|
||||
echo 'Running mypy ...'
|
||||
$PYTHON -m mypy scripts/*.py tests/scripts/*.py ||
|
||||
$PYTHON -m mypy framework/scripts/mbedtls_framework/*.py scripts/*.py tests/scripts/*.py ||
|
||||
ret=1
|
||||
|
||||
exit $ret
|
||||
|
@ -24,7 +24,7 @@ except ImportError:
|
||||
pass
|
||||
|
||||
import scripts_path # pylint: disable=unused-import
|
||||
from mbedtls_dev import build_tree
|
||||
from mbedtls_framework import build_tree
|
||||
|
||||
|
||||
class FileIssueTracker:
|
||||
|
@ -45,7 +45,7 @@ import subprocess
|
||||
import logging
|
||||
|
||||
import scripts_path # pylint: disable=unused-import
|
||||
from mbedtls_dev import build_tree
|
||||
from mbedtls_framework import build_tree
|
||||
|
||||
|
||||
# Naming patterns to check against. These are defined outside the NameCheck
|
||||
|
@ -48,12 +48,12 @@ from abc import ABCMeta
|
||||
from typing import List
|
||||
|
||||
import scripts_path # pylint: disable=unused-import
|
||||
from mbedtls_dev import test_data_generation
|
||||
from mbedtls_dev import bignum_common
|
||||
from mbedtls_framework import test_data_generation
|
||||
from mbedtls_framework import bignum_common
|
||||
# Import modules containing additional test classes
|
||||
# Test function classes in these modules will be registered by
|
||||
# the framework
|
||||
from mbedtls_dev import bignum_core, bignum_mod_raw, bignum_mod # pylint: disable=unused-import
|
||||
from mbedtls_framework import bignum_core, bignum_mod_raw, bignum_mod # pylint: disable=unused-import
|
||||
|
||||
class BignumTarget(test_data_generation.BaseTarget):
|
||||
#pylint: disable=too-few-public-methods
|
||||
|
@ -11,11 +11,11 @@ as in generate_bignum_tests.py.
|
||||
import sys
|
||||
|
||||
import scripts_path # pylint: disable=unused-import
|
||||
from mbedtls_dev import test_data_generation
|
||||
from mbedtls_framework import test_data_generation
|
||||
# Import modules containing additional test classes
|
||||
# Test function classes in these modules will be registered by
|
||||
# the framework
|
||||
from mbedtls_dev import ecp # pylint: disable=unused-import
|
||||
from mbedtls_framework import ecp # pylint: disable=unused-import
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Use the section of the docstring relevant to the CLI as description
|
||||
|
@ -14,13 +14,13 @@ import sys
|
||||
from typing import Callable, Dict, FrozenSet, Iterable, Iterator, List, Optional
|
||||
|
||||
import scripts_path # pylint: disable=unused-import
|
||||
from mbedtls_dev import crypto_data_tests
|
||||
from mbedtls_dev import crypto_knowledge
|
||||
from mbedtls_dev import macro_collector #pylint: disable=unused-import
|
||||
from mbedtls_dev import psa_information
|
||||
from mbedtls_dev import psa_storage
|
||||
from mbedtls_dev import test_case
|
||||
from mbedtls_dev import test_data_generation
|
||||
from mbedtls_framework import crypto_data_tests
|
||||
from mbedtls_framework import crypto_knowledge
|
||||
from mbedtls_framework import macro_collector #pylint: disable=unused-import
|
||||
from mbedtls_framework import psa_information
|
||||
from mbedtls_framework import psa_storage
|
||||
from mbedtls_framework import test_case
|
||||
from mbedtls_framework import test_data_generation
|
||||
|
||||
|
||||
|
||||
|
@ -15,10 +15,10 @@ import os
|
||||
from typing import Iterator, List, Optional, Tuple
|
||||
|
||||
import scripts_path #pylint: disable=unused-import
|
||||
from mbedtls_dev import build_tree
|
||||
from mbedtls_dev import c_parsing_helper
|
||||
from mbedtls_dev import c_wrapper_generator
|
||||
from mbedtls_dev import typing_util
|
||||
from mbedtls_framework import build_tree
|
||||
from mbedtls_framework import c_parsing_helper
|
||||
from mbedtls_framework import c_wrapper_generator
|
||||
from mbedtls_framework import typing_util
|
||||
|
||||
|
||||
class BufferParameter:
|
||||
|
@ -14,7 +14,7 @@ import sys
|
||||
import argparse
|
||||
import jinja2
|
||||
import scripts_path # pylint: disable=unused-import
|
||||
from mbedtls_dev.build_tree import guess_project_root
|
||||
from mbedtls_framework.build_tree import guess_project_root
|
||||
|
||||
TEST_DIR = os.path.join(guess_project_root(), 'tests')
|
||||
DATA_FILES_PATH = os.path.join(TEST_DIR, 'data_files')
|
||||
|
@ -10,8 +10,8 @@ from typing import Iterator, List, Tuple
|
||||
import re
|
||||
import argparse
|
||||
import scripts_path # pylint: disable=unused-import
|
||||
from mbedtls_dev.asymmetric_key_data import ASYMMETRIC_KEY_DATA
|
||||
from mbedtls_dev.build_tree import guess_project_root
|
||||
from mbedtls_framework.asymmetric_key_data import ASYMMETRIC_KEY_DATA
|
||||
from mbedtls_framework.build_tree import guess_project_root
|
||||
|
||||
BYTES_PER_LINE = 16
|
||||
|
||||
|
@ -15,3 +15,6 @@ import sys
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__),
|
||||
os.path.pardir, os.path.pardir,
|
||||
'scripts'))
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__),
|
||||
os.path.pardir, os.path.pardir,
|
||||
'framework', 'scripts'))
|
||||
|
@ -20,7 +20,7 @@ from typing import List
|
||||
|
||||
#pylint: disable=unused-import
|
||||
import scripts_path
|
||||
from mbedtls_dev import build_tree
|
||||
from mbedtls_framework import build_tree
|
||||
|
||||
# PSA Compliance tests we expect to fail due to known defects in Mbed TLS /
|
||||
# TF-PSA-Crypto (or the test suite).
|
||||
|
@ -19,9 +19,9 @@ import sys
|
||||
from typing import Iterable, List, Optional, Tuple
|
||||
|
||||
import scripts_path # pylint: disable=unused-import
|
||||
from mbedtls_dev import c_build_helper
|
||||
from mbedtls_dev.macro_collector import InputsForTest, PSAMacroEnumerator
|
||||
from mbedtls_dev import typing_util
|
||||
from mbedtls_framework import c_build_helper
|
||||
from mbedtls_framework.macro_collector import InputsForTest, PSAMacroEnumerator
|
||||
from mbedtls_framework import typing_util
|
||||
|
||||
def gather_inputs(headers: Iterable[str],
|
||||
test_suites: Iterable[str],
|
||||
|
Reference in New Issue
Block a user