aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorwbond <will@wbond.net>2019-07-19 15:40:16 -0400
committerwbond <will@wbond.net>2019-07-19 15:40:16 -0400
commit8406b94b4058335f8b92a62170fca1c0ab7d11c5 (patch)
tree8d809b84e62b1d44b89a94bbe0316ab6768f9d1d /dev
parent564e744e9b3ec01b542efcac57949a704e3de8a4 (diff)
downloadasn1crypto-8406b94b4058335f8b92a62170fca1c0ab7d11c5.tar.gz
Update ci and tests tasks to use revised local_oscrypto() function
Diffstat (limited to 'dev')
-rw-r--r--dev/ci.py25
-rw-r--r--dev/tests.py8
2 files changed, 24 insertions, 9 deletions
diff --git a/dev/ci.py b/dev/ci.py
index bd9ed8b..c819696 100644
--- a/dev/ci.py
+++ b/dev/ci.py
@@ -36,13 +36,22 @@ def run():
print('Python ' + sys.version.replace('\n', ''))
- try:
- oscrypto_tests_module_info = imp.find_module('tests', [os.path.join(build_root, 'oscrypto')])
- oscrypto_tests = imp.load_module('oscrypto.tests', *oscrypto_tests_module_info)
- oscrypto = oscrypto_tests.local_oscrypto()
- print('\noscrypto backend: %s' % oscrypto.backend())
- except (ImportError):
- pass
+ oscrypto_tests_module_info = imp.find_module('tests', [os.path.join(build_root, 'oscrypto')])
+ oscrypto_tests = imp.load_module('oscrypto.tests', *oscrypto_tests_module_info)
+ asn1crypto, oscrypto = oscrypto_tests.local_oscrypto()
+ print(
+ '\nasn1crypto: %s, %s' % (
+ asn1crypto.__version__,
+ os.path.dirname(asn1crypto.__file__)
+ )
+ )
+ print(
+ 'oscrypto: %s backend, %s, %s' % (
+ oscrypto.backend(),
+ oscrypto.__version__,
+ os.path.dirname(oscrypto.__file__)
+ )
+ )
if run_lint:
print('')
@@ -57,7 +66,7 @@ def run():
else:
print('\nRunning tests')
sys.stdout.flush()
- tests_result = run_tests()
+ tests_result = run_tests(ci=True)
sys.stdout.flush()
return lint_result and tests_result
diff --git a/dev/tests.py b/dev/tests.py
index 071ee23..e05d4a2 100644
--- a/dev/tests.py
+++ b/dev/tests.py
@@ -1,14 +1,16 @@
# coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
+import os
import unittest
import re
import sys
from tests import test_classes
+import asn1crypto
-def run(matcher=None):
+def run(matcher=None, ci=False):
"""
Runs the tests
@@ -20,6 +22,10 @@ def run(matcher=None):
A bool - if the tests succeeded
"""
+ if not ci:
+ print('Python ' + sys.version.replace('\n', ''))
+ print('\nasn1crypto: %s, %s\n' % (asn1crypto.__version__, os.path.dirname(asn1crypto.__file__)))
+
suite = unittest.TestSuite()
loader = unittest.TestLoader()
for test_class in test_classes():