summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Burke <tim.burke@gmail.com>2016-12-07 20:14:22 +0000
committerTim Burke <tim.burke@gmail.com>2017-09-13 21:27:06 +0000
commit45918310349556225f2125daf5b1f60ef3dee027 (patch)
tree3f27052b8a331a5ba492b00a4f1dec40c7faa141
parent08bfdb2e48b67332a7468bb44fbb280a529a020c (diff)
downloadpyeclib-45918310349556225f2125daf5b1f60ef3dee027.tar.gz
Install jerasure from source when testing liberasure-master
Change-Id: I5e88c7268641b6bcad019748544ffd2694cee50f
-rwxr-xr-xtools/pip-install-with-liberasurecode.sh28
-rw-r--r--tox.ini2
2 files changed, 30 insertions, 0 deletions
diff --git a/tools/pip-install-with-liberasurecode.sh b/tools/pip-install-with-liberasurecode.sh
index 7745ef8..bdb43b6 100755
--- a/tools/pip-install-with-liberasurecode.sh
+++ b/tools/pip-install-with-liberasurecode.sh
@@ -16,6 +16,34 @@ if [ -n "$ISAL_DIR" ]; then
popd
fi
+if [ -n "$GFCOMPLETE_DIR" ]; then
+ if [ ! -d "$GFCOMPLETE_DIR" ]; then
+ git clone http://lab.jerasure.org/jerasure/gf-complete.git "$GFCOMPLETE_DIR"
+ fi
+ pushd "$GFCOMPLETE_DIR"
+ ./autogen.sh
+ ./configure --prefix "$VIRTUAL_ENV"
+ make
+ make install
+ popd
+fi
+
+if [ -n "$JERASURE_DIR" ]; then
+ if [ -z "$GFCOMPLETE_DIR" ]; then
+ echo "JERASURE_DIR requires that GFCOMPLETE_DIR be set!"
+ exit 1
+ fi
+ if [ ! -d "$JERASURE_DIR" ]; then
+ git clone http://lab.jerasure.org/jerasure/jerasure.git "$JERASURE_DIR"
+ fi
+ pushd "$JERASURE_DIR"
+ autoreconf --force --install
+ LD_LIBRARY_PATH="$VIRTUAL_ENV"/lib ./configure --prefix "$VIRTUAL_ENV" LDFLAGS="-L$VIRTUAL_ENV/lib" CPPFLAGS="-I$VIRTUAL_ENV/include"
+ make
+ make install
+ popd
+fi
+
if [ -z "$LIBERASURECODE_DIR" ]; then
echo "Expected LIBERASURECODE_DIR to be set!"
exit 1
diff --git a/tox.ini b/tox.ini
index 56a9518..b1b6e14 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,6 +10,8 @@ commands=
[testenv:liberasurecode-git]
setenv = LIBERASURECODE_DIR={envdir}/liberasurecode
ISAL_DIR={envdir}/isa-l
+ JERASURE_DIR={envdir}/jerasure
+ GFCOMPLETE_DIR={envdir}/gf-complete
passenv = LIBERASURECODE_REF
install_command =
{toxinidir}/tools/pip-install-with-liberasurecode.sh {opts} {packages}