mirror of
https://github.com/henrydcase/pqc.git
synced 2024-11-22 15:39:07 +00:00
Speed up circleci tests
This commit is contained in:
parent
33ac64d922
commit
a66d24971f
@ -22,6 +22,7 @@ version: 2.1
|
|||||||
command: |
|
command: |
|
||||||
docker run -e CI=true -e PQCLEAN_ONLY_TYPES -e PQCLEAN_ONLY_DIFF=1 -e PQCLEAN_SKIP_SCHEMES=sphincs-haraka-128f-robust,sphincs-haraka-192s-robust,sphincs-sha256-128f-robust,sphincs-sha256-192s-robust,sphincs-shake256-128f-robust,sphincs-shake256-192s-robust,sphincs-haraka-128f-simple,sphincs-haraka-192s-simple,sphincs-sha256-128f-simple,sphincs-sha256-192s-simple,sphincs-shake256-128f-simple,sphincs-shake256-192s-simple,sphincs-haraka-128s-robust,sphincs-haraka-256f-robust,sphincs-sha256-128s-robust,sphincs-sha256-256f-robust,sphincs-shake256-128s-robust,sphincs-shake256-256f-robust,sphincs-haraka-128s-simple,sphincs-haraka-256f-simple,sphincs-sha256-128s-simple,sphincs-sha256-256f-simple,sphincs-shake256-128s-simple,sphincs-shake256-256f-simple,sphincs-haraka-192f-robust,sphincs-haraka-256s-robust,sphincs-sha256-192f-robust,sphincs-sha256-256s-robust,sphincs-shake256-192f-robust,sphincs-shake256-256s-robust,sphincs-haraka-192f-simple,sphincs-haraka-256s-simple,sphincs-sha256-192f-simple,sphincs-sha256-256s-simple,sphincs-shake256-192f-simple,sphincs-shake256-256s-simple --rm -v `pwd`:`pwd` -w `pwd` -v ~/ccache:/ccache "pqclean/ci-container:$ARCH" /bin/bash -c "
|
docker run -e CI=true -e PQCLEAN_ONLY_TYPES -e PQCLEAN_ONLY_DIFF=1 -e PQCLEAN_SKIP_SCHEMES=sphincs-haraka-128f-robust,sphincs-haraka-192s-robust,sphincs-sha256-128f-robust,sphincs-sha256-192s-robust,sphincs-shake256-128f-robust,sphincs-shake256-192s-robust,sphincs-haraka-128f-simple,sphincs-haraka-192s-simple,sphincs-sha256-128f-simple,sphincs-sha256-192s-simple,sphincs-shake256-128f-simple,sphincs-shake256-192s-simple,sphincs-haraka-128s-robust,sphincs-haraka-256f-robust,sphincs-sha256-128s-robust,sphincs-sha256-256f-robust,sphincs-shake256-128s-robust,sphincs-shake256-256f-robust,sphincs-haraka-128s-simple,sphincs-haraka-256f-simple,sphincs-sha256-128s-simple,sphincs-sha256-256f-simple,sphincs-shake256-128s-simple,sphincs-shake256-256f-simple,sphincs-haraka-192f-robust,sphincs-haraka-256s-robust,sphincs-sha256-192f-robust,sphincs-sha256-256s-robust,sphincs-shake256-192f-robust,sphincs-shake256-256s-robust,sphincs-haraka-192f-simple,sphincs-haraka-256s-simple,sphincs-sha256-192f-simple,sphincs-sha256-256s-simple,sphincs-shake256-192f-simple,sphincs-shake256-256s-simple --rm -v `pwd`:`pwd` -w `pwd` -v ~/ccache:/ccache "pqclean/ci-container:$ARCH" /bin/bash -c "
|
||||||
uname -a &&
|
uname -a &&
|
||||||
|
PQCLEAN_SKIP_TESTS=api_h,char,duplicate_consistency,metadata,preprocessor,no_symlinks,microsoft_nmakefile_present,makefile_present,format,license
|
||||||
export CCACHE_NOSTATS=1 &&
|
export CCACHE_NOSTATS=1 &&
|
||||||
export CCACHE_DIR=/ccache &&
|
export CCACHE_DIR=/ccache &&
|
||||||
export CCACHE_SLOPPINESS=include_file_mtime &&
|
export CCACHE_SLOPPINESS=include_file_mtime &&
|
||||||
|
@ -39,8 +39,8 @@ def walk_tree(ast, parent=[]):
|
|||||||
pqclean.Scheme.all_implementations(),
|
pqclean.Scheme.all_implementations(),
|
||||||
ids=str,
|
ids=str,
|
||||||
)
|
)
|
||||||
@helpers.filtered_test
|
|
||||||
@helpers.skip_windows()
|
@helpers.skip_windows()
|
||||||
|
@helpers.filtered_test
|
||||||
def test_char(implementation):
|
def test_char(implementation):
|
||||||
errors = []
|
errors = []
|
||||||
for fname in os.listdir(implementation.path()):
|
for fname in os.listdir(implementation.path()):
|
||||||
|
@ -17,28 +17,34 @@ sys.tracebacklimit = 0
|
|||||||
def pytest_generate_tests(metafunc):
|
def pytest_generate_tests(metafunc):
|
||||||
ids = []
|
ids = []
|
||||||
argvalues = []
|
argvalues = []
|
||||||
for scheme in pqclean.Scheme.all_schemes():
|
if 'duplicate_consistency' not in os.environ.get('PQCLEAN_SKIP_TESTS', '').split(','):
|
||||||
for implementation in scheme.implementations:
|
for scheme in pqclean.Scheme.all_schemes():
|
||||||
if os.path.isfile(
|
for implementation in scheme.implementations:
|
||||||
os.path.join(
|
if os.path.isfile(
|
||||||
|
os.path.join(
|
||||||
|
'duplicate_consistency',
|
||||||
|
'{}_{}.yml'.format(scheme.name, implementation.name))):
|
||||||
|
metafile = os.path.join(
|
||||||
'duplicate_consistency',
|
'duplicate_consistency',
|
||||||
'{}_{}.yml'.format(scheme.name, implementation.name))):
|
'{}_{}.yml'.format(scheme.name, implementation.name))
|
||||||
metafile = os.path.join(
|
with open(metafile, encoding='utf-8') as f:
|
||||||
'duplicate_consistency',
|
metadata = yaml.safe_load(f.read())
|
||||||
'{}_{}.yml'.format(scheme.name, implementation.name))
|
for group in metadata['consistency_checks']:
|
||||||
with open(metafile, encoding='utf-8') as f:
|
source = pqclean.Implementation.by_name(
|
||||||
metadata = yaml.safe_load(f.read())
|
group['source']['scheme'],
|
||||||
for group in metadata['consistency_checks']:
|
group['source']['implementation'])
|
||||||
source = pqclean.Implementation.by_name(
|
argvalues.append(
|
||||||
group['source']['scheme'],
|
(implementation, source, group['files']))
|
||||||
group['source']['implementation'])
|
ids.append(
|
||||||
argvalues.append(
|
"{metafile}: {scheme.name} {implementation.name}"
|
||||||
(implementation, source, group['files']))
|
.format(scheme=scheme,
|
||||||
ids.append(
|
implementation=implementation,
|
||||||
"{metafile}: {scheme.name} {implementation.name}"
|
metafile=metafile))
|
||||||
.format(scheme=scheme,
|
else:
|
||||||
implementation=implementation,
|
# Placeholders so we don't crash
|
||||||
metafile=metafile))
|
ids = ['dummy']
|
||||||
|
argvalues = [('dummy', 'dummy', 'dummy')]
|
||||||
|
|
||||||
metafunc.parametrize(('implementation', 'source', 'files'),
|
metafunc.parametrize(('implementation', 'source', 'files'),
|
||||||
argvalues,
|
argvalues,
|
||||||
ids=ids)
|
ids=ids)
|
||||||
|
@ -19,8 +19,9 @@ additional_flags = [] #['-fix-errors']
|
|||||||
@helpers.skip_windows()
|
@helpers.skip_windows()
|
||||||
@helpers.filtered_test
|
@helpers.filtered_test
|
||||||
def test_clang_tidy(implementation: pqclean.Implementation):
|
def test_clang_tidy(implementation: pqclean.Implementation):
|
||||||
if platform.machine() in ['i386']:
|
if platform.machine() in ['armv7l']:
|
||||||
raise unittest.SkipTest("Clang-tidy has false-positives on i386")
|
# armv7l: slow, not more useful than i386
|
||||||
|
raise unittest.SkipTest()
|
||||||
helpers.ensure_available('clang-tidy')
|
helpers.ensure_available('clang-tidy')
|
||||||
cfiles = implementation.cfiles()
|
cfiles = implementation.cfiles()
|
||||||
common_files = glob(os.path.join('..', 'common', '*.c'))
|
common_files = glob(os.path.join('..', 'common', '*.c'))
|
||||||
|
Loading…
Reference in New Issue
Block a user