diff options
-rw-r--r-- | .zuul.yaml | 19 | ||||
-rw-r--r-- | pyeclib/core.py | 5 | ||||
-rwxr-xr-x | test/ec_pyeclib_file_test.sh | 6 | ||||
-rwxr-xr-x | tools/pip-install-with-liberasurecode.sh | 2 |
4 files changed, 28 insertions, 4 deletions
@@ -1,6 +1,7 @@ - project: templates: - openstack-python-jobs + - libec-pyeclib-jobs-arm64 check: jobs: - test-release-openstack: @@ -78,3 +79,21 @@ timeout: 1800 vars: tox_envlist: py39-compilelibs + +- job: + name: libec-pyeclib-unit-arm64 + parent: libec-pyeclib-unit + nodeset: ubuntu-focal-arm64 + description: | + Run unit tests for an OpenStack Python project under cPython + version 3.9 on top of arm64 architecture. + +- project-template: + name: libec-pyeclib-jobs-arm64 + description: | + Runs pyeclib unit tests designated for testing on top of + ARM64 architecture + check-arm64: + jobs: + - libec-pyeclib-unit-arm64: + voting: false diff --git a/pyeclib/core.py b/pyeclib/core.py index 11e29e3..3fbbcd3 100644 --- a/pyeclib/core.py +++ b/pyeclib/core.py @@ -58,6 +58,11 @@ class ECPyECLibDriver(object): self.algsig_chksum, validate) + def __repr__(self): + return '%s(k=%r, m=%r, hd=%r, ec_type=%r, chksum_type=%r)' % ( + self.__class__.__name__, self.k, self.m, self.hd, self.ec_type, + self.chksum_type) + def encode(self, data_bytes): return pyeclib_c.encode(self.handle, data_bytes) diff --git a/test/ec_pyeclib_file_test.sh b/test/ec_pyeclib_file_test.sh index 446ad62..f9f396b 100755 --- a/test/ec_pyeclib_file_test.sh +++ b/test/ec_pyeclib_file_test.sh @@ -66,7 +66,7 @@ for TYPE in ${TYPES}; do FAULT_TOL=${NUM_PARITY} if [[ ${TYPE} == "flat_xor_hd"* ]]; then FAULT_TOL="2" - fi + fi for file in `cd ${FILES}; echo *; cd ..`; do python ${TOOLS_DIR}/pyeclib_encode.py ${NUM_DATA} ${NUM_PARITY} ${TYPE} ${FILE_DIR} ${file} ${FRAGMENT_DIR} done @@ -76,10 +76,10 @@ for TYPE in ${TYPES}; do let i=0 while (( $i < ${FAULT_TOL} )); do index=$(( RANDOM % NUM_TOTAL )) - fragments[${index}]="" + fragments[${index}]="" let i=$i+1 done - python ${TOOLS_DIR}/pyeclib_decode.py ${NUM_DATA} ${NUM_PARITY} ${TYPE} ${fragments[*]} ${DECODED_DIR}/${file} + python ${TOOLS_DIR}/pyeclib_decode.py ${NUM_DATA} ${NUM_PARITY} ${TYPE} ${fragments[*]} ${DECODED_DIR}/${file} diff ${FILE_DIR}/${file} ${DECODED_DIR}/${file}.decoded if [[ $? != 0 ]]; then echo "${FILE_DIR}/${file} != ${DECODED_DIR}/${file}.decoded" diff --git a/tools/pip-install-with-liberasurecode.sh b/tools/pip-install-with-liberasurecode.sh index 10a8093..2b3d394 100755 --- a/tools/pip-install-with-liberasurecode.sh +++ b/tools/pip-install-with-liberasurecode.sh @@ -6,7 +6,7 @@ fi if [ -n "$ISAL_DIR" ]; then if [ ! -d "$ISAL_DIR" ]; then - git clone git://github.com/01org/isa-l.git "$ISAL_DIR" + git clone git://github.com/intel/isa-l.git -b v2.30.0 "$ISAL_DIR" fi pushd "$ISAL_DIR" ./autogen.sh |