summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Greenan <kmgreen2@gmail.com>2015-05-19 10:31:54 -0700
committerKevin Greenan <kmgreen2@gmail.com>2015-05-19 10:31:54 -0700
commit169feb5589f9b342c0f013a89cb69c7caa6dc1b5 (patch)
treea62036ac043c6faab18841482dbf723621c1d876
parent041d44311bf3d7d3f655dfc6c692d8693b9e0634 (diff)
downloadpyeclib-plugin_internal_rs.tar.gz
Plugging in new internal RS backend into pyeclibplugin_internal_rs
-rw-r--r--pyeclib/ec_iface.py4
-rw-r--r--setup.py2
-rw-r--r--src/c/pyeclib_c/pyeclib_c.c3
-rwxr-xr-xtest/ec_pyeclib_file_test.sh3
-rw-r--r--test/test_pyeclib_c.py3
5 files changed, 11 insertions, 4 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
diff --git a/setup.py b/setup.py
index c57e1cd..ecc2879 100644
--- a/setup.py
+++ b/setup.py
@@ -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")
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..5ceebc0 100755
--- a/test/ec_pyeclib_file_test.sh
+++ b/test/ec_pyeclib_file_test.sh
@@ -37,7 +37,8 @@ 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"
+TYPES="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)]