diff options
author | Tushar Gohad <tusharsg@gmail.com> | 2015-06-21 18:37:37 -0700 |
---|---|---|
committer | Tushar Gohad <tusharsg@gmail.com> | 2015-06-21 18:37:37 -0700 |
commit | 34507789b4a7aad2ec29d81f772354989676313d (patch) | |
tree | 944592f4511a125cbfee9dbcf656797759e0bd41 | |
parent | 041d44311bf3d7d3f655dfc6c692d8693b9e0634 (diff) | |
parent | 53f7c09b7015b90935d0187d3a04d907287b7b37 (diff) | |
download | pyeclib-34507789b4a7aad2ec29d81f772354989676313d.tar.gz |
Merged new_commits_for_1_0_8 into master
-rw-r--r-- | pyeclib/ec_iface.py | 4 | ||||
-rw-r--r-- | setup.py | 4 | ||||
-rw-r--r-- | src/c/pyeclib_c/pyeclib_c.c | 3 | ||||
-rwxr-xr-x | test/ec_pyeclib_file_test.sh | 2 | ||||
-rw-r--r-- | test/test_pyeclib_c.py | 3 |
5 files changed, 11 insertions, 5 deletions
diff --git a/pyeclib/ec_iface.py b/pyeclib/ec_iface.py index 493ea82..70c3386 100644 --- a/pyeclib/ec_iface.py +++ b/pyeclib/ec_iface.py @@ -46,7 +46,8 @@ VALID_EC_TYPES = ['jerasure_rs_vand', 'flat_xor_hd_3', 'flat_xor_hd_4', 'isa_l_rs_vand', - 'shss'] + 'shss', + 'liberasurecode_rs_vand'] @unique @@ -94,6 +95,7 @@ class PyECLib_EC_Types(PyECLibEnum): flat_xor_hd = 3 isa_l_rs_vand = 4 shss = 5 + liberasurecode_rs_vand = 6 # Output of Erasure (en)Coding process are data "fragments". Fragment data @@ -149,7 +149,7 @@ class install(_install): print("** %s" % ldpath_str) print("** ") print("** Run 'ldconfig' or place this line: ") - print("** export %s=%s" % (ldpath_str, "%susr/local/lib" + print("** export %s=%s" % (ldpath_str, "%s/usr/local/lib" % installroot)) print("** ") print("** into .bashrc, .profile, or the appropriate shell") @@ -163,7 +163,7 @@ module = Extension('pyeclib_c', define_macros=[('MAJOR VERSION', '1'), ('MINOR VERSION', '0')], include_dirs=[default_python_incdir, - '/usr/local/include', + '/usr/local/include/liberasurecode', '/usr/local/include/jerasure', '/usr/include', 'src/c/pyeclib_c', diff --git a/src/c/pyeclib_c/pyeclib_c.c b/src/c/pyeclib_c/pyeclib_c.c index 72c0dac..47dfa9f 100644 --- a/src/c/pyeclib_c/pyeclib_c.c +++ b/src/c/pyeclib_c/pyeclib_c.c @@ -813,6 +813,9 @@ static const char* backend_id_to_str(uint8_t backend_id) case 4: backend_id_str = "isa_l_rs_vand\0"; break; + case 6: + backend_id_str = "liberasurecode_rs_vand\0"; + break; default: backend_id_str = "unknown\0"; } diff --git a/test/ec_pyeclib_file_test.sh b/test/ec_pyeclib_file_test.sh index 95383b2..0d05195 100755 --- a/test/ec_pyeclib_file_test.sh +++ b/test/ec_pyeclib_file_test.sh @@ -37,7 +37,7 @@ if [ ! -d ${FRAGMENT_DIR} ]; then mkdir ${FRAGMENT_DIR} fi -TYPES="flat_xor_hd jerasure_rs_vand jerasure_rs_cauchy" +TYPES="flat_xor_hd jerasure_rs_vand jerasure_rs_cauchy liberasurecode_rs_vand" NUM_DATAS="10 11 12" RS_NUM_PARITIES="2 3 4" XOR_NUM_PARITIES="6" diff --git a/test/test_pyeclib_c.py b/test/test_pyeclib_c.py index eaa93dc..9827fd3 100644 --- a/test/test_pyeclib_c.py +++ b/test/test_pyeclib_c.py @@ -77,7 +77,8 @@ class TestPyECLib(unittest.TestCase): # EC algorithm and config parameters self.rs_types = [(PyECLib_EC_Types.jerasure_rs_vand), (PyECLib_EC_Types.jerasure_rs_cauchy), - (PyECLib_EC_Types.isa_l_rs_vand)] + (PyECLib_EC_Types.isa_l_rs_vand), + (PyECLib_EC_Types.liberasurecode_rs_vand)] self.xor_types = [(PyECLib_EC_Types.flat_xor_hd, 12, 6, 4), (PyECLib_EC_Types.flat_xor_hd, 10, 5, 4), (PyECLib_EC_Types.flat_xor_hd, 10, 5, 3)] |