Add --test option to copy the test jar (#279)
diff --git a/bin/impl/fetch.sh b/bin/impl/fetch.sh
index d373906..982af50 100755
--- a/bin/impl/fetch.sh
+++ b/bin/impl/fetch.sh
@@ -55,6 +55,7 @@
exit 1
fi
cp "$accumulo_built_tarball" "$DOWNLOADS"/
+ [[ $1 == '--test' ]] && cp "$ACCUMULO_REPO/test/target/accumulo-test-2.1.0-SNAPSHOT.jar" "$DOWNLOADS"/
else
download_apache "accumulo/$ACCUMULO_VERSION" "$ACCUMULO_TARBALL" "$ACCUMULO_HASH"
fi
@@ -128,6 +129,7 @@
Options:
--no-deps Dependencies will be fetched unless this option is specified. Only works for fluo & accumulo components.
+ --test Copy the test jar built in accumulo to the downloads directory
EOF
exit 1
esac
diff --git a/bin/impl/install/accumulo.sh b/bin/impl/install/accumulo.sh
index bb490f7..04b9a2d 100755
--- a/bin/impl/install/accumulo.sh
+++ b/bin/impl/install/accumulo.sh
@@ -18,6 +18,13 @@
# shellcheck source=bin/impl/util.sh
source "$UNO_HOME"/bin/impl/util.sh
+function install_test_jar() {
+ local test_jar_source="$DOWNLOADS/accumulo-test-$ACCUMULO_VERSION.jar"
+ local test_jar_destination="$ACCUMULO_HOME/lib"
+ print_to_console "Installing Apache Accumulo test jar $test_jar_source to $test_jar_destination"
+ cp "$test_jar_source" "$test_jar_destination"
+}
+
pkill -f accumulo.start
# stop if any command fails
@@ -35,6 +42,9 @@
tar xzf "$DOWNLOADS/$ACCUMULO_TARBALL" -C "$INSTALL"
+# Install test jar if available
+[[ $1 == '--test' ]] && install_test_jar
+
conf=$ACCUMULO_HOME/conf
cp "$UNO_HOME"/conf/accumulo/common/* "$conf"
diff --git a/bin/impl/util.sh b/bin/impl/util.sh
index a47af57..f5a6344 100755
--- a/bin/impl/util.sh
+++ b/bin/impl/util.sh
@@ -151,7 +151,7 @@
function print_cmd_usage() {
cat <<EOF
-Usage: uno $1 <component> [--no-deps]
+Usage: uno $1 <component> [--no-deps] [--test]
Possible components:
@@ -161,9 +161,9 @@
fluo-yarn $2 Apache Fluo YARN and its dependencies (Fluo, Accumulo, Hadoop, & ZooKeeper)
zookeeper $2 Apache ZooKeeper
-Options:
+Options (these only work for fluo and accumulo components):
--no-deps Dependencies will be setup unless this option is specified.
- Only works for fluo & accumulo components.
+ --test Copy the test jar built in accumulo to downloads. Requires ACCUMULO_REPO
EOF
}