You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/11/25 19:37:14 UTC

git commit: ACCUMULO-1925 ensure system tests respect ACCUMULO_CONF_DIR.

Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 564885cc0 -> 919691010


ACCUMULO-1925 ensure system tests respect ACCUMULO_CONF_DIR.

(cherry-picked from commit 422aaaa7c35de07c280d496e489fbab541edeea3)

Reason: Tests
Author: Ryan Fishel <ry...@cloudera.com>
Author: John Vines <jv...@gmail.com>

Conflicts:
	test/system/auto/TestUtils.py
	test/system/continuous/start-stats.sh

Signed-off-by: Eric Newton <er...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/91969101
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/91969101
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/91969101

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 919691010835462f1dff42ee097a2f6cddf4e76b
Parents: 564885c
Author: John Vines <jv...@gmail.com>
Authored: Fri Nov 8 10:53:24 2013 -0500
Committer: Eric Newton <er...@gmail.com>
Committed: Mon Nov 25 10:34:24 2013 -0500

----------------------------------------------------------------------
 test/system/continuous/agitator.pl               | 6 ++++++
 test/system/continuous/continuous-env.sh.example | 1 +
 test/system/continuous/magitator.pl              | 7 ++++++-
 test/system/continuous/mapred-setup.sh           | 4 ++++
 test/system/continuous/start-stats.sh            | 4 ++++
 test/system/randomwalk/bin/reset-cluster.sh      | 4 ++++
 test/system/randomwalk/bin/start-all.sh          | 4 ++++
 test/system/randomwalk/bin/start-local.sh        | 4 ++++
 test/system/scalability/run.py                   | 3 +++
 9 files changed, 36 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/91969101/test/system/continuous/agitator.pl
----------------------------------------------------------------------
diff --git a/test/system/continuous/agitator.pl b/test/system/continuous/agitator.pl
index d9c5395..c779983 100755
--- a/test/system/continuous/agitator.pl
+++ b/test/system/continuous/agitator.pl
@@ -52,6 +52,12 @@ if($sleep2 > $sleep2max){
 	die("sleep2 > sleep2max $sleep2 > $sleep2max");
 }
 
+if(defined $ENV{'ACCUMULO_CONF_DIR'}){
+  $ACCUMULO_CONF_DIR = $ENV{'ACCUMULO_CONF_DIR'};
+}else{
+	$ACCUMULO_CONF_DIR = $ACCUMULO_HOME . '/conf';
+}
+
 if(scalar(@ARGV) == 4){
 	$minKill = $ARGV[2];
 	$maxKill = $ARGV[3];

http://git-wip-us.apache.org/repos/asf/accumulo/blob/91969101/test/system/continuous/continuous-env.sh.example
----------------------------------------------------------------------
diff --git a/test/system/continuous/continuous-env.sh.example b/test/system/continuous/continuous-env.sh.example
index 453c299..833393a 100644
--- a/test/system/continuous/continuous-env.sh.example
+++ b/test/system/continuous/continuous-env.sh.example
@@ -17,6 +17,7 @@
 # Inherit values from environment if they are already set.
 HADOOP_HOME=${HADOOP_HOME:-/opt/hadoop}
 ACCUMULO_HOME=${ACCUMULO_HOME:-/opt/accumulo}
+ACCUMULO_CONF_DIR=${ACCUMULO_CONF_DIR:-$ACCUMULO_HOME/conf}
 JAVA_HOME=${JAVA_HOME:-/opt/java}
 ZOOKEEPER_HOME=${ZOOKEEPER_HOME:-/opt/zookeeper}
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/91969101/test/system/continuous/magitator.pl
----------------------------------------------------------------------
diff --git a/test/system/continuous/magitator.pl b/test/system/continuous/magitator.pl
index a0cab60..921c4d1 100755
--- a/test/system/continuous/magitator.pl
+++ b/test/system/continuous/magitator.pl
@@ -23,9 +23,14 @@ if(scalar(@ARGV) != 2){
 	exit(1);
 }
 
-
 $ACCUMULO_HOME="../../..";
 
+if(defined $ENV{'ACCUMULO_CONF_DIR'}){
+        $ACCUMULO_CONF_DIR = $ENV{'ACCUMULO_CONF_DIR'};
+}else{
+	$ACCUMULO_CONF_DIR = $ACCUMULO_HOME . '/conf';
+}
+
 $sleep1 = $ARGV[0];
 $sleep2 = $ARGV[1];
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/91969101/test/system/continuous/mapred-setup.sh
----------------------------------------------------------------------
diff --git a/test/system/continuous/mapred-setup.sh b/test/system/continuous/mapred-setup.sh
index e6bd2ca..2f8340b 100755
--- a/test/system/continuous/mapred-setup.sh
+++ b/test/system/continuous/mapred-setup.sh
@@ -18,6 +18,10 @@
 # a little helper script that other scripts can source to setup 
 # for running a map reduce job
 
+if [ -z "$ACCUMULO_CONF_DIR" ]; then
+    ACCUMULO_CONF_DIR=${ACCUMULO_HOME}/conf
+fi
+
 CONTINUOUS_CONF_DIR=${CONTINUOUS_CONF_DIR:-$ACCUMULO_HOME/test/system/continuous/}
 . $CONTINUOUS_CONF_DIR/continuous-env.sh
 . $ACCUMULO_CONF_DIR/accumulo-env.sh

http://git-wip-us.apache.org/repos/asf/accumulo/blob/91969101/test/system/continuous/start-stats.sh
----------------------------------------------------------------------
diff --git a/test/system/continuous/start-stats.sh b/test/system/continuous/start-stats.sh
index dab1a7a..061b9b3 100755
--- a/test/system/continuous/start-stats.sh
+++ b/test/system/continuous/start-stats.sh
@@ -15,6 +15,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+if [ -z "${ACCUMULO_CONF_DIR}" ]; then
+    ACCUMULO_CONF_DIR=${ACCUMULO_HOME}/conf
+fi
 # Start: Resolve Script Directory
 SOURCE="${BASH_SOURCE[0]}"
 while [ -h "${SOURCE}" ]; do # resolve $SOURCE until the file is no longer a symlink
@@ -27,6 +30,7 @@ script=$( basename "${SOURCE}" )
 # Stop: Resolve Script Directory
 
 CONTINUOUS_CONF_DIR=${CONTINUOUS_CONF_DIR:-${bin}}
+
 . $CONTINUOUS_CONF_DIR/continuous-env.sh
 
 mkdir -p $CONTINUOUS_LOG_DIR

http://git-wip-us.apache.org/repos/asf/accumulo/blob/91969101/test/system/randomwalk/bin/reset-cluster.sh
----------------------------------------------------------------------
diff --git a/test/system/randomwalk/bin/reset-cluster.sh b/test/system/randomwalk/bin/reset-cluster.sh
index b5beb65..d394222 100755
--- a/test/system/randomwalk/bin/reset-cluster.sh
+++ b/test/system/randomwalk/bin/reset-cluster.sh
@@ -34,6 +34,10 @@ this="$bin/$script"
 ACCUMULO_HOME=`dirname "$this"`/../../../..
 export ACCUMULO_HOME=`cd $ACCUMULO_HOME; pwd`
 
+if [ -z "$ACCUMULO_CONF_DIR" ] ; then
+    $ACCUMULO_CONF_DIR=${ACCUMULO_HOME}/conf
+fi
+
 if [ -f $ACCUMULO_CONF_DIR/accumulo-env.sh ] ; then
 . $ACCUMULO_CONF_DIR/accumulo-env.sh
 fi

http://git-wip-us.apache.org/repos/asf/accumulo/blob/91969101/test/system/randomwalk/bin/start-all.sh
----------------------------------------------------------------------
diff --git a/test/system/randomwalk/bin/start-all.sh b/test/system/randomwalk/bin/start-all.sh
index de9a9f1..48219c6 100755
--- a/test/system/randomwalk/bin/start-all.sh
+++ b/test/system/randomwalk/bin/start-all.sh
@@ -34,6 +34,10 @@ this="$bin/$script"
 ACCUMULO_HOME=`dirname "$this"`/../../../..
 export ACCUMULO_HOME=`cd $ACCUMULO_HOME; pwd`
 
+if [ -z "${ACCUMULO_CONF_DIR}" ]; then
+    export ACCUMULO_CONF_DIR=${ACCUMULO_HOME}/conf
+fi
+
 if [ -f $ACCUMULO_CONF_DIR/accumulo-env.sh ] ; then
 . $ACCUMULO_CONF_DIR/accumulo-env.sh
 fi

http://git-wip-us.apache.org/repos/asf/accumulo/blob/91969101/test/system/randomwalk/bin/start-local.sh
----------------------------------------------------------------------
diff --git a/test/system/randomwalk/bin/start-local.sh b/test/system/randomwalk/bin/start-local.sh
index ebb1e92..524a80b 100755
--- a/test/system/randomwalk/bin/start-local.sh
+++ b/test/system/randomwalk/bin/start-local.sh
@@ -35,6 +35,10 @@ this="$bin/$script"
 ACCUMULO_HOME=`dirname "$this"`/../../../..
 export ACCUMULO_HOME=`cd $ACCUMULO_HOME; pwd`
 
+if [ -z "$ACCUMULO_CONF_DIR" ] ; then
+    export ACCUMULO_CONF_DIR=${ACCUMULO_HOME}/conf
+fi
+
 if [ -f $ACCUMULO_CONF_DIR/accumulo-env.sh ] ; then
 . $ACCUMULO_CONF_DIR/accumulo-env.sh
 fi

http://git-wip-us.apache.org/repos/asf/accumulo/blob/91969101/test/system/scalability/run.py
----------------------------------------------------------------------
diff --git a/test/system/scalability/run.py b/test/system/scalability/run.py
index ad98d63..46661ff 100755
--- a/test/system/scalability/run.py
+++ b/test/system/scalability/run.py
@@ -173,6 +173,9 @@ def main():
     if not os.getenv('ACCUMULO_HOME'):
         raise 'ACCUMULO_HOME needs to be set!'
 
+    if not os.getenv('ACCUMULO_CONF_DIR'):
+        os.environ['ACCUMULO_CONF_DIR'] = os.path.join(os.getenv('ACCUMULO_HOME'), 'conf')
+
     if not os.getenv('HADOOP_HOME'):
 		raise 'HADOOP_HOME needs to be set!'