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/10/25 22:01:00 UTC
git commit: ACCUMULO-1803 remove auto
Updated Branches:
refs/heads/master 3f6c66ede -> c3ca9872a
ACCUMULO-1803 remove auto
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/c3ca9872
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/c3ca9872
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/c3ca9872
Branch: refs/heads/master
Commit: c3ca9872a1b272fc89b006cdc779f61bb7237759
Parents: 3f6c66e
Author: Eric Newton <er...@gmail.com>
Authored: Fri Oct 25 16:01:19 2013 -0400
Committer: Eric Newton <er...@gmail.com>
Committed: Fri Oct 25 16:01:19 2013 -0400
----------------------------------------------------------------------
.../accumulo/test/functional/RunTests.java | 168 -------
.../accumulo/test/functional/ClassLoaderIT.java | 4 +-
test/src/test/resources/TestCombinerX.jar | Bin 0 -> 1525 bytes
test/src/test/resources/TestCombinerY.jar | Bin 0 -> 1524 bytes
test/system/auto/JavaTest.py | 67 ---
test/system/auto/README | 44 --
test/system/auto/TestCombinerX.jar | Bin 1525 -> 0 bytes
test/system/auto/TestCombinerY.jar | Bin 1524 -> 0 bytes
test/system/auto/TestUtils.py | 469 -------------------
test/system/auto/config.py | 43 --
test/system/auto/pkill.sh | 40 --
test/system/auto/run.py | 306 ------------
test/system/auto/simple/__init__.py | 15 -
test/system/auto/sleep.py | 21 -
test/system/auto/stress/__init__.py | 15 -
15 files changed, 2 insertions(+), 1190 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/src/main/java/org/apache/accumulo/test/functional/RunTests.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/RunTests.java b/test/src/main/java/org/apache/accumulo/test/functional/RunTests.java
deleted file mode 100644
index 91ee66e..0000000
--- a/test/src/main/java/org/apache/accumulo/test/functional/RunTests.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.test.functional;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.accumulo.core.cli.Help;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.conf.Configured;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.io.LongWritable;
-import org.apache.hadoop.io.Text;
-import org.apache.hadoop.mapreduce.Job;
-import org.apache.hadoop.mapreduce.Mapper;
-import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
-import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
-import org.apache.hadoop.util.Tool;
-import org.apache.hadoop.util.ToolRunner;
-import org.apache.log4j.Logger;
-
-import com.beust.jcommander.Parameter;
-
-/**
- * Runs the functional tests via map-reduce.
- *
- * First, be sure everything is compiled.
- *
- * Second, get a list of the tests you want to run:
- *
- * <pre>
- * $ python test/system/auto/run.py -l > tests
- * </pre>
- *
- * Put the list of tests into HDFS:
- *
- * <pre>
- * $ hadoop fs -put tests /user/hadoop/tests
- * </pre>
- *
- * Run the map-reduce job:
- *
- * <pre>
- * $ ./bin/accumulo accumulo.test.functional.RunTests --tests /user/hadoop/tests --output /user/hadoop/results
- * </pre>
- *
- * Note that you will need to have some configuration in conf/accumulo-site.xml (to locate zookeeper). The map-reduce jobs will not use your local accumulo
- * instance.
- *
- */
-public class RunTests extends Configured implements Tool {
-
- static final public String JOB_NAME = "Functional Test Runner";
- private static final Logger log = Logger.getLogger(RunTests.class);
-
- private Job job = null;
-
- static class Opts extends Help {
- @Parameter(names="--tests", description="newline separated list of tests to run", required=true)
- String testFile;
- @Parameter(names="--output", description="destination for the results of tests in HDFS", required=true)
- String outputPath;
- }
-
- static public class TestMapper extends Mapper<LongWritable,Text,Text,Text> {
-
- @Override
- protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
- List<String> cmd = Arrays.asList("/usr/bin/python", "test/system/auto/run.py", "-t", value.toString());
- log.info("Running test " + cmd);
- ProcessBuilder pb = new ProcessBuilder(cmd);
- pb.directory(new File(context.getConfiguration().get("accumulo.home")));
- pb.redirectErrorStream(true);
- Process p = pb.start();
- p.getOutputStream().close();
- InputStream out = p.getInputStream();
- byte[] buffer = new byte[1024];
- int len = 0;
- Text result = new Text();
- try {
- while ((len = out.read(buffer)) > 0) {
- log.info("More: " + new String(buffer, 0, len));
- result.append(buffer, 0, len);
- }
- } catch (Exception ex) {
- log.error(ex, ex);
- }
- p.waitFor();
- context.write(value, result);
- }
-
- }
-
- @Override
- public int run(String[] args) throws Exception {
- job = new Job(getConf(), JOB_NAME);
- job.setJarByClass(this.getClass());
- Opts opts = new Opts();
- opts.parseArgs(RunTests.class.getName(), args);
-
- // this is like 1-2 tests per mapper
- Configuration conf = job.getConfiguration();
- conf.setInt("mapred.max.split.size", 40);
- conf.set("accumulo.home", System.getenv("ACCUMULO_HOME"));
- conf.setInt("mapred.task.timeout", 8 * 60 * 1000);
- conf.setBoolean("mapred.map.tasks.speculative.execution", false);
-
- // set input
- job.setInputFormatClass(TextInputFormat.class);
- TextInputFormat.setInputPaths(job, new Path(opts.testFile));
-
- // set output
- job.setOutputFormatClass(TextOutputFormat.class);
- FileSystem fs = FileSystem.get(conf);
- Path destination = new Path(opts.outputPath);
- if (fs.exists(destination)) {
- log.info("Deleting existing output directory " + opts.outputPath);
- fs.delete(destination, true);
- }
- TextOutputFormat.setOutputPath(job, destination);
-
- // configure default reducer: put the results into one file
- job.setNumReduceTasks(1);
-
- // set mapper
- job.setMapperClass(TestMapper.class);
- job.setOutputKeyClass(Text.class);
- job.setOutputValueClass(Text.class);
-
- // don't do anything with the results (yet) a summary would be nice
- job.setNumReduceTasks(0);
-
- // submit the job
- log.info("Starting tests");
- return 0;
- }
-
- /**
- * @param args
- * @throws Exception
- */
- public static void main(String[] args) throws Exception {
- RunTests tests = new RunTests();
- ToolRunner.run(new Configuration(), tests, args);
- tests.job.waitForCompletion(true);
- if (!tests.job.isSuccessful())
- System.exit(1);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/src/test/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ClassLoaderIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
index 0834b89..03db691 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
@@ -56,7 +56,7 @@ public class ClassLoaderIT extends SimpleMacIT {
scanCheck(c, "Test");
FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
Path jarPath = new Path(rootPath() + "/lib/Test.jar");
- fs.copyFromLocalFile(new Path(System.getProperty("user.dir") + "/system/auto/TestCombinerX.jar"), jarPath);
+ fs.copyFromLocalFile(new Path(System.getProperty("user.dir") + "/src/test/resources/TestCombinerX.jar"), jarPath);
UtilWaitThread.sleep(1000);
IteratorSetting is = new IteratorSetting(10, "TestCombiner", "org.apache.accumulo.test.functional.TestCombiner");
Combiner.setColumns(is, Collections.singletonList(new IteratorSetting.Column("cf")));
@@ -64,7 +64,7 @@ public class ClassLoaderIT extends SimpleMacIT {
UtilWaitThread.sleep(5000);
scanCheck(c, "TestX");
fs.delete(jarPath, true);
- fs.copyFromLocalFile(new Path(System.getProperty("user.dir") + "/system/auto/TestCombinerY.jar"), jarPath);
+ fs.copyFromLocalFile(new Path(System.getProperty("user.dir") + "/src/test/resources/TestCombinerY.jar"), jarPath);
UtilWaitThread.sleep(5000);
scanCheck(c, "TestY");
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/src/test/resources/TestCombinerX.jar
----------------------------------------------------------------------
diff --git a/test/src/test/resources/TestCombinerX.jar b/test/src/test/resources/TestCombinerX.jar
new file mode 100644
index 0000000..d9451f7
Binary files /dev/null and b/test/src/test/resources/TestCombinerX.jar differ
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/src/test/resources/TestCombinerY.jar
----------------------------------------------------------------------
diff --git a/test/src/test/resources/TestCombinerY.jar b/test/src/test/resources/TestCombinerY.jar
new file mode 100644
index 0000000..a3ce3ae
Binary files /dev/null and b/test/src/test/resources/TestCombinerY.jar differ
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/system/auto/JavaTest.py
----------------------------------------------------------------------
diff --git a/test/system/auto/JavaTest.py b/test/system/auto/JavaTest.py
deleted file mode 100755
index cca32c6..0000000
--- a/test/system/auto/JavaTest.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import os
-import unittest
-import time
-import logging
-
-from subprocess import PIPE
-from TestUtils import TestUtilsMixin, ROOT, ROOT_PASSWORD, INSTANCE_NAME
-
-log = logging.getLogger('test.auto')
-
-class JavaTest(TestUtilsMixin, unittest.TestCase):
- "Base class for Java Functional Test"
-
- order = 21
- testClass=""
-
- maxRuntime = 120
-
- def setUp(self):
- handle = self.runJTest('localhost','getConfig')
- out,err = handle.communicate()
- log.debug(out)
- log.debug(err)
- assert handle.returncode==0
-
- self.settings = TestUtilsMixin.settings.copy()
- self.settings.update(eval(out))
- TestUtilsMixin.setUp(self);
- self.maxRuntime = self.timeout_factor * self.maxRuntime
-
- handle = self.runJTest(self.masterHost(),'setup')
- out,err = handle.communicate()
- log.debug(out)
- log.debug(err)
- assert handle.returncode==0
-
- def runJTest(self,host, cmd):
- return self.runClassOn(host, 'org.apache.accumulo.test.functional.FunctionalTest', ['-u',ROOT,'-p',ROOT_PASSWORD,'-i',INSTANCE_NAME,'--classname', self.testClass,'--opt', cmd])
-
- def runTest(self):
- handle = self.runJTest(self.masterHost(),'run')
- self.waitForStop(handle, self.maxRuntime)
-
- handle = self.runJTest(self.masterHost(),'cleanup')
- out,err = handle.communicate()
- log.debug(out)
- log.debug(err)
- assert handle.returncode==0
-
- self.shutdown_accumulo()
-
-
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/system/auto/README
----------------------------------------------------------------------
diff --git a/test/system/auto/README b/test/system/auto/README
deleted file mode 100644
index 2694d0d..0000000
--- a/test/system/auto/README
+++ /dev/null
@@ -1,44 +0,0 @@
-Apache Accumulo Functional Tests
-
-These scripts run a series of tests against a small local accumulo instance. To run these scripts,
-you must have hadoop and zookeeper installed and running. You will need a functioning C compiler to build
-a shared library needed for one of the tests. The test suite is known to run on Linux RedHat Enterprise
-version 5, and Mac OS X 10.5.
-
-The tests are shown as being run from the ACCUMULO_HOME directory, but they should run from any directory.
-Make sure to create "logs" and "walogs" directories in ACCUMULO_HOME. Also, ensure that accumulo-env.sh
-specifies its ACCUMULO_LOG_DIR in the following way:
-test -z "$ACCUMULO_LOG_DIR" && export ACCUMULO_LOG_DIR=$ACCUMULO_HOME/logs
-
- $ ./test/system/auto/run.py -l
-
-Will list all the test names. You can run the suite like this:
-
- $ ./test/system/auto/run.py
-
-You can select tests using a case-insensitive regular expression:
-
- $ ./test/system/auto/run.py -t simple
- $ ./test/system/auto/run.py -t SunnyDay
-
-If you are attempting to debug what is causing a test to fail, you can run the tests in "verbose" mode:
-
- $ python test/system/auto/run.py -t SunnyDay -v 10
-
-If a test is failing, and you would like to examine logs from the run, you can run the test in "dirty"
-mode which will keep the test from cleaning up all the logs at the end of the run:
-
- $ ./test/system/auto/run.py -t some.failing.test -d
-
-If the test suite hangs, and you would like to re-run the tests starting with the last test that failed:
-
- $ ./test/system/auto/run.py -s start.over.test
-
-The full test suite can take over an hour. If you have a larger hadoop cluster at your disposal, you can
-run the tests as a map-reduce job:
-
- $ python test/system/auto/run.py -l > tests
- $ hadoop fs -put tests /user/hadoop/tests
- $ ./bin/accumulo org.apache.accumulo.test.functional.RunTests --tests /user/hadoop/tests --output /user/hadoop/results
-
-
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/system/auto/TestCombinerX.jar
----------------------------------------------------------------------
diff --git a/test/system/auto/TestCombinerX.jar b/test/system/auto/TestCombinerX.jar
deleted file mode 100644
index d9451f7..0000000
Binary files a/test/system/auto/TestCombinerX.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/system/auto/TestCombinerY.jar
----------------------------------------------------------------------
diff --git a/test/system/auto/TestCombinerY.jar b/test/system/auto/TestCombinerY.jar
deleted file mode 100644
index a3ce3ae..0000000
Binary files a/test/system/auto/TestCombinerY.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/system/auto/TestUtils.py
----------------------------------------------------------------------
diff --git a/test/system/auto/TestUtils.py b/test/system/auto/TestUtils.py
deleted file mode 100755
index c70baf1..0000000
--- a/test/system/auto/TestUtils.py
+++ /dev/null
@@ -1,469 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from subprocess import Popen as BasePopen, PIPE
-
-import os
-import time
-import logging
-import unittest
-import sys
-import socket
-import signal
-import select
-import random
-import shutil
-import sleep
-
-# mapreduce sets SIGHUP to ignore, which we use to stop child processes
-# so set it back to the default
-signal.signal(signal.SIGHUP, signal.SIG_DFL)
-
-# determine unique identity to use for this test run
-ID=socket.getfqdn().split('.')[0] + '-' + str(os.getpid())
-
-# offset the port numbers a little to allow simultaneous test execution
-FUZZ=os.getpid() % 997
-
-# figure out where we are
-ACCUMULO_HOME = os.path.dirname(__file__)
-ACCUMULO_HOME = os.path.join(ACCUMULO_HOME, *(os.path.pardir,)*3)
-ACCUMULO_HOME = os.path.realpath(ACCUMULO_HOME)
-ACCUMULO_DIR = "/user/" + os.getenv('LOGNAME') + "/accumulo-" + ID
-SITE = "test-" + ID
-
-LOG_PROPERTIES= os.path.join(ACCUMULO_HOME, 'conf', 'log4j.properties')
-LOG_GENERIC = os.path.join(ACCUMULO_HOME, 'conf', 'generic_logger.xml')
-LOG_MONITOR = os.path.join(ACCUMULO_HOME, 'conf', 'monitor_logger.xml')
-General_CLASSPATH = """
-$ACCUMULO_HOME/server/target/classes/,
- $ACCUMULO_HOME/core/target/classes/,
- $ACCUMULO_HOME/lib/accumulo-core.jar,
- $ACCUMULO_HOME/start/target/classes/,
- $ACCUMULO_HOME/lib/accumulo-start.jar,
- $ACCUMULO_HOME/fate/target/classes/,
- $ACCUMULO_HOME/lib/accumulo-fate.jar,
- $ACCUMULO_HOME/examples/simple/target/classes,
- $ACCUMULO_HOME/lib/accumulo-examples-simple.jar,
- $ACCUMULO_HOME/lib/[^.].*.jar,
- $ZOOKEEPER_HOME/zookeeper[^.].*.jar,
- $HADOOP_CONF_DIR,
- $HADOOP_PREFIX/[^.].*.jar,
- $HADOOP_PREFIX/lib/[^.].*.jar,
- $HADOOP_PREFIX/share/hadoop/common/.*.jar,
- $HADOOP_PREFIX/share/hadoop/common/lib/.*.jar,
- $HADOOP_PREFIX/share/hadoop/hdfs/.*.jar,
- $HADOOP_PREFIX/share/hadoop/mapreduce/.*.jar,
- $HADOOP_PREFIX/share/hadoop/yarn/.*.jar,
-"""
-
-log = logging.getLogger('test.auto')
-
-ROOT = 'root'
-ROOT_PASSWORD = 'secret'
-INSTANCE_NAME=ID
-ZOOKEEPERS = socket.getfqdn()
-
-accumulo_site = os.path.join(ACCUMULO_HOME, 'conf', 'accumulo-site.xml')
-if os.path.exists(accumulo_site):
- import config
- ZOOKEEPERS = config.parse(accumulo_site).get('instance.zookeeper.host', ZOOKEEPERS)
-
-class Popen(BasePopen):
- def __init__(self, cmd, **args):
- self.cmd = cmd
- BasePopen.__init__(self, cmd, **args)
-
-def quote(cmd):
- result = []
- for part in cmd:
- if '"' in part:
- result.append("'%s'" % part)
- else:
- result.append('"%s"' % part)
- return result
-
-class TestUtilsMixin:
- "Define lots of utilities to run accumulo utilities"
- hosts = () # machines to run accumulo
-
- settings = {'tserver.port.search': 'true',
- 'tserver.memory.maps.max':'100M',
- 'tserver.cache.data.size':'10M',
- 'tserver.cache.index.size':'20M',
- 'instance.zookeeper.timeout': '10s',
- 'gc.cycle.delay': '1s',
- 'gc.cycle.start': '1s',
- }
- tableSettings = {}
-
- def masterHost(self):
- return self.hosts[0]
-
- def runOn(self, host, cmd, **opts):
- cmd = map(str, cmd)
- log.debug('%s: %s', host, ' '.join(cmd))
- if host == 'localhost' or host == socket.getfqdn():
- os.environ['ACCUMULO_TSERVER_OPTS']='-Xmx800m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 '
- os.environ['ACCUMULO_GENERAL_OPTS']=('-Dorg.apache.accumulo.config.file=%s' % (SITE))
- os.environ['ACCUMULO_LOG_DIR']= ACCUMULO_HOME + '/logs/' + ID
- os.environ['ACCUMULO_TEST']= "TEST"
- return Popen(cmd, stdout=PIPE, stderr=PIPE, **opts)
- else:
- cp = 'HADOOP_CLASSPATH=%s' % os.environ.get('HADOOP_CLASSPATH','')
- jo = "ACCUMULO_TSERVER_OPTS='-Xmx700m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 '"
- go = ("ACCUMULO_GENERAL_OPTS='-Dorg.apache.accumulo.config.file=%s'" % (SITE))
- ld = 'ACCUMULO_LOG_DIR=%s/logs/%s' % (ACCUMULO_HOME, ID)
- os.environ['ACCUMULO_TEST']= "TEST"
- execcmd = ['ssh', '-q', host, cp, jo, go, ld] + quote(cmd)
- log.debug(repr(execcmd))
- return Popen(execcmd, stdout=PIPE, stderr=PIPE, **opts)
-
- def shell(self, host, input, **opts):
- """Run accumulo shell with the given input,
- return the exit code, stdout and stderr"""
- log.debug("Running shell with %r", input)
- handle = self.runOn(host, [self.accumulo_sh(), 'shell', '-u', ROOT, '-p', ROOT_PASSWORD], stdin=PIPE, **opts)
- out, err = handle.communicate(input)
- return out, err, handle.returncode
-
- def accumulo_sh(self):
- "Determine the location of accumulo"
- result = os.path.join(ACCUMULO_HOME, 'scripts', 'accumulo')
- if not os.path.exists(result):
- result = os.path.join(ACCUMULO_HOME, 'bin', 'accumulo')
- return result
-
- def start_master(self, host, safeMode=None):
- goalState = 'NORMAL'
- if safeMode:
- goalState = 'SAFE_MODE'
- self.wait(self.runOn('localhost',
- [self.accumulo_sh(),
- 'org.apache.accumulo.server.master.state.SetGoalState',
- goalState]))
- return self.runOn(host, [self.accumulo_sh(), 'master'])
-
- def processResult(self, out, err, code):
- if out:
- log.debug("Output from command: %s", str(out).rstrip())
- if err:
- if err.find('at org.apache.accumulo.core') > 0 or err.find('at org.apache.accumulo.server') > 0 :
- log.error("This looks like a stack trace: %s", err)
- return False
- else:
- log.info("Error output from command: %s", err.rstrip())
- log.debug("Exit code: %s", code)
- return code == 0
-
-
- def wait(self, handle):
- out, err = handle.communicate()
- return self.processResult(out, err, handle.returncode)
-
-
- def pkill(self, host, pattern, signal=signal.SIGKILL):
- cmd = [os.path.join(ACCUMULO_HOME, 'test', 'system', 'auto', 'pkill.sh'), str(signal), str(os.getuid()), pattern + '.*' + ID]
- handle = self.runOn(host, cmd)
- handle.communicate()
-
- def cleanupAccumuloHandles(self, secs=2):
- handles = []
- for h in self.accumuloHandles:
- if not self.isStopped(h, secs):
- handles.append(h)
- self.accumuloHandles = handles
-
- def stop_master(self, host):
- self.pkill(host, 'Main master$', signal=signal.SIGHUP)
- self.cleanupAccumuloHandles()
-
- def start_tserver(self, host):
- return self.runOn(host,
- [self.accumulo_sh(), 'tserver'])
-
- def start_monitor(self, host):
- return self.runOn(host, [self.accumulo_sh(), 'monitor'])
-
- def start_gc(self, host):
- return self.runOn(host, [self.accumulo_sh(), 'gc'])
-
- def stop_gc(self, host):
- self.pkill(host, 'Main gc$', signal=signal.SIGHUP)
- # wait for it to stop
- self.sleep(0.5)
- self.cleanupAccumuloHandles(0.5)
-
- def stop_monitor(self, host):
- self.pkill(host, 'app=monitor', signal=signal.SIGHUP)
- # wait for it to stop
- self.sleep(0.5)
- self.cleanupAccumuloHandles(0.5)
-
- def stop_tserver(self, host, signal=signal.SIGHUP):
- self.pkill(host, 'Main tserver$', signal)
- # wait for it to stop
- self.sleep(0.5)
- self.cleanupAccumuloHandles(0.5)
-
- def runClassOn(self, host, klass, args, **kwargs):
- "Invoke a the given class in the accumulo classpath"
- return self.runOn(host,
- [self.accumulo_sh(), klass] + args,
- **kwargs)
-
- def ingest(self, host, count, start=0, timestamp=None, size=50, colf=None, **kwargs):
- klass = 'org.apache.accumulo.test.TestIngest'
- args = ''
- if timestamp:
- args += "-ts %ld " % int(timestamp)
- args += '--debug -i %s -u %s --size %d --random 56 --rows %d --start %d --cols 1 --createTable -p %s' % (INSTANCE_NAME, ROOT, size, count, start, ROOT_PASSWORD)
- if colf:
- args = '--columnFamily %s ' % colf + args
- return self.runClassOn(host, klass, args.split(), **kwargs)
-
- def verify(self, host, count, start=0, size=50, timestamp=None, colf='colf'):
- klass = 'org.apache.accumulo.test.VerifyIngest'
- args = ''
- if timestamp:
- args += "-ts %ld " % int(timestamp)
- args += '-i %s -u %s --size %d --random 56 -cf %s --rows %d --start %d --cols 1 -p %s' % (INSTANCE_NAME, ROOT, size, colf, count, start, ROOT_PASSWORD)
- return self.runClassOn(host, klass, args.split())
-
- def stop_accumulo(self, signal=signal.SIGHUP):
- log.info('killing accumulo processes everywhere')
- for host in self.hosts:
- self.pkill(host, 'accumulo.config.file', signal)
-
- def create_config_file(self, settings):
- fp = open(os.path.join(ACCUMULO_HOME, 'conf', SITE),
- 'w')
- fp.write('<configuration>\n')
- settings = self.settings.copy()
- settings.update({ 'instance.zookeeper.host': ZOOKEEPERS,
- 'instance.dfs.dir': ACCUMULO_DIR,
- 'tserver.port.client': 39000 + FUZZ,
- 'master.port.client': 41000 + FUZZ,
- 'monitor.port.client': 50099,
- 'gc.port.client': 45000 + FUZZ,
- 'general.classpaths' :General_CLASSPATH,
- 'instance.secret': 'secret',
- })
- for a, v in settings.items():
- fp.write(' <property>\n')
- fp.write(' <name>%s</name>\n' % a)
- fp.write(' <value>%s</value>\n' % v)
- fp.write(' </property>\n')
- fp.write('</configuration>\n')
- fp.close()
-
- def clean_accumulo(self, host):
- self.stop_accumulo(signal.SIGKILL)
- self.create_config_file(self.settings.copy())
-
- os.system('rm -rf %s/logs/%s/*.log' % (ACCUMULO_HOME, ID))
-
- self.wait(self.runOn(host,
- ['hadoop', 'fs', '-rmr', ACCUMULO_DIR]))
- handle = self.runOn(host, [self.accumulo_sh(), 'init','--clear-instance-name'], stdin=PIPE)
- out, err = handle.communicate(INSTANCE_NAME+"\n"+ROOT_PASSWORD + "\n" + ROOT_PASSWORD+"\n")
- self.processResult(out, err, handle.returncode)
-
- def setup_logging(self):
- if os.path.exists(LOG_PROPERTIES):
- os.rename(LOG_PROPERTIES, '%s.bkp' % LOG_PROPERTIES)
- if os.path.exists(LOG_GENERIC):
- os.rename(LOG_GENERIC, '%s.bkp' % LOG_GENERIC)
- if os.path.exists(LOG_MONITOR):
- os.rename(LOG_MONITOR, '%s.bkp' % LOG_MONITOR)
-
- shutil.copyfile('%s/conf/examples/512MB/standalone/log4j.properties' % ACCUMULO_HOME, LOG_PROPERTIES)
- shutil.copyfile('%s/conf/examples/512MB/standalone/generic_logger.xml' % ACCUMULO_HOME, LOG_GENERIC)
- shutil.copyfile('%s/conf/examples/512MB/standalone/monitor_logger.xml' % ACCUMULO_HOME, LOG_MONITOR)
-
-
- def start_accumulo_procs(self, safeMode=None):
- self.accumuloHandles = [
- self.start_tserver(host) for host in self.hosts
- ] + [
- self.start_monitor(self.masterHost())
- ]
- self.accumuloHandles.insert(0, self.start_master(self.masterHost(), safeMode))
-
- def setPerTableSettings(self, table):
- settings = []
- values = self.tableSettings.get(table,{})
- if values :
- for k, v in values.items():
- settings.append('config -t %s -s %s=%s\n' % (table, k, v))
- self.processResult(*self.shell(self.masterHost(), ''.join(settings)))
-
- def start_accumulo(self, safeMode=None):
- self.start_accumulo_procs(safeMode)
- self.setPerTableSettings('!METADATA')
-
- def rootShell(self, host, cmd, **opts):
- return self.shell(host, cmd, **opts)
-
- def flush(self, tablename):
- out, err, code = self.rootShell(self.masterHost(),
- "flush -t %s\n" % tablename)
- assert code == 0
-
- def isStopped(self, handle, secs):
- stop = time.time() + secs * sleep.scale
-
- while time.time() < stop:
- time.sleep(0.1)
- try:
- code = handle.poll()
- if code is not None:
- out, err = '', ''
- try:
- out, err = handle.communicate()
- except Exception:
- pass
- return True
- except OSError, ex:
- if ex.args[0] != errno.ECHILD:
- raise
- return False
-
- def waitForStop(self, handle, secs):
- log.debug('Waiting for %s to stop in %s secs',
- ' '.join(handle.cmd),
- secs)
- stop = time.time() + secs * sleep.scale
- out = ''
- err = ''
-
- handles = []
- if handle.stdout != None:
- handles.append(handle.stdout)
- if handle.stderr != None:
- handles.append(handle.stderr)
- if handles:
- for fd in handles[:]:
- try:
- import fcntl
- fcntl.fcntl(fd, fcntl.F_SETFL, os.O_NDELAY)
- except:
- handles.remove(fd)
- while time.time() < stop:
- rd, wr, ex = select.select(handles[:], [], [], max(0, stop - time.time()))
- if handle.stdout in rd:
- more = handle.stdout.read(1024)
- if more:
- log.debug("out: " + more.rstrip())
- out += more
- else:
- handles.remove(handle.stdout)
- if handle.stderr in rd:
- more = handle.stderr.read(1024)
- if more:
- log.debug("err: " + more.rstrip())
- err += more
- else:
- handles.remove(handle.stderr)
- if not handles:
- break
- if not handles:
- if handle.returncode is None:
- handle.communicate()
- if handle.stdout:
- handle.stdout.close()
- if handle.stderr:
- handle.stderr.close()
- self.assert_(self.processResult(out, err, handle.returncode))
- return out, err
- self.fail("Process failed to finish in %s seconds" % secs)
-
- def shutdown_accumulo(self, seconds=100):
- handle = self.runOn(self.masterHost(),
- [self.accumulo_sh(), 'admin', '-u', ROOT,
- '-p', ROOT_PASSWORD, 'stopAll'])
- self.waitForStop(handle, self.timeout_factor * seconds)
- self.stop_monitor(self.masterHost())
- self.cleanupAccumuloHandles()
- # give everyone a couple seconds to completely stop
- for h in self.accumuloHandles:
- self.waitForStop(h, 10)
-
- def clean_logging(self):
- LOG_PROPERTIES_BACKUP='%s.bkp' % LOG_PROPERTIES
- LOG_GENERIC_BACKUP='%s.bkp' % LOG_GENERIC
- LOG_MONITOR_BACKUP='%s.bkp' % LOG_MONITOR
- if os.path.exists(LOG_PROPERTIES):
- os.remove(LOG_PROPERTIES)
- if os.path.exists(LOG_GENERIC):
- os.remove(LOG_GENERIC)
- if os.path.exists(LOG_MONITOR):
- os.remove(LOG_MONITOR)
- if os.path.exists(LOG_PROPERTIES_BACKUP):
- os.rename(LOG_PROPERTIES_BACKUP, LOG_PROPERTIES)
- if os.path.exists(LOG_GENERIC_BACKUP):
- os.rename(LOG_GENERIC_BACKUP, LOG_GENERIC)
- if os.path.exists(LOG_MONITOR_BACKUP):
- os.rename(LOG_MONITOR_BACKUP, LOG_MONITOR)
-
- def sleep(self, secs):
- log.debug("Sleeping %f seconds" % secs)
- sleep.sleep(secs)
-
- def setUp(self):
- self.hosts = self.options.hosts
- self.timeout_factor = self.options.timeout_factor
- self.clean_accumulo(self.masterHost())
- self.setup_logging()
- self.start_accumulo()
-
- def tearDown(self):
- if self.options.clean:
- self.stop_accumulo()
- self.wait(self.runOn(self.masterHost(),
- ['hadoop', 'fs', '-rmr', ACCUMULO_DIR]))
- self.wait(self.runClassOn(self.masterHost(),
- 'org.apache.accumulo.server.util.DeleteZooInstance',
- ['-i', INSTANCE_NAME]))
- self.wait(self.runOn(self.masterHost(), ['rm', '-rf', ACCUMULO_HOME + '/logs/' + ID]))
- self.clean_logging()
- os.unlink(os.path.join(ACCUMULO_HOME, 'conf', SITE))
-
- def createTable(self, table, splitFile=None):
- if splitFile :
- out, err, code = self.rootShell(self.masterHost(),
- "createtable %s -sf %s\n" % (table, splitFile))
- else :
- out, err, code = self.rootShell(self.masterHost(),
- "createtable %s\n" % table)
- self.processResult(out, err, code)
- self.setPerTableSettings(table)
-
- def getTableId(self, table):
- if table == '!METADATA' :
- return '!0'
- handle = self.runClassOn(self.masterHost(), 'org.apache.accumulo.test.ListTables',['-u', ROOT]);
- out,err = handle.communicate()
- self.assert_(handle.returncode==0)
- for line in out.split('\n') :
- if line.find("=>") < 0:
- continue
- left, right = line.split("=>")
- left = left.strip()
- right = right.strip()
- if left == table :
- return right
- else :
- self.fail('Did not find table id for '+table)
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/system/auto/config.py
----------------------------------------------------------------------
diff --git a/test/system/auto/config.py b/test/system/auto/config.py
deleted file mode 100755
index e223d02..0000000
--- a/test/system/auto/config.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from xml.sax import make_parser, handler
-
-def parse(filename):
- 'Read an accumulo config file and return it as a dictionary string -> string'
- result = {}
- class Handler(handler.ContentHandler):
- name = None
- content = ''
-
- def startElement(self, name, atts):
- self.content = ''
-
- def characters(self, data):
- self.content += data
-
- def endElement(self, name):
- if name == 'value' and self.name != None:
- result[self.name] = str(self.content).strip()
- self.name = None
- if name == 'name':
- self.name = str(self.content).strip()
- self.content = ''
-
- p = make_parser()
- p.setContentHandler(Handler())
- p.parse(filename)
- return result
-
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/system/auto/pkill.sh
----------------------------------------------------------------------
diff --git a/test/system/auto/pkill.sh b/test/system/auto/pkill.sh
deleted file mode 100755
index 72546e6..0000000
--- a/test/system/auto/pkill.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /usr/bin/env bash
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-OS=`uname -s`
-
-#Validate arguments
-if [ -z "$1" -o -z "$2" -o -z "$3" ]; then
-echo "Usage: $0 <SIGNAL> <UID> <PATTERN>"
-exit 1
-fi
-
-#Darwin settings (MacOS)
-if [ $OS = Darwin ]; then
- ps -eo pid,command | grep "$3" | grep -v grep | awk '{ print $1 }' | grep -v $$ | xargs kill -$1
-
-#Linux settings (RedHat)
-elif [ $OS = Linux ]; then
- #echo pkill -$1 -U $2 -f "$3"
- exec pkill -$1 -U $2 -f "$3"
-
-#Any other OS
-else
- echo "Unrecognized OS"
- exit 1
-#End OS checking
-fi
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/system/auto/run.py
----------------------------------------------------------------------
diff --git a/test/system/auto/run.py b/test/system/auto/run.py
deleted file mode 100755
index 3ff3465..0000000
--- a/test/system/auto/run.py
+++ /dev/null
@@ -1,306 +0,0 @@
-#! /usr/bin/env python
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import os
-import time
-import logging
-import unittest
-import glob
-import re
-import sys
-import socket
-from subprocess import Popen, PIPE
-
-from TestUtils import ACCUMULO_HOME, ACCUMULO_DIR
-COBERTURA_HOME = os.path.join(ACCUMULO_HOME, 'lib', 'test', 'cobertura')
-import sleep
-
-log = logging.getLogger('test.auto')
-
-def getTests():
- allTests = []
- base = os.path.dirname(os.path.realpath(__file__))
- sys.path.insert(0, base)
- for path in glob.glob(os.path.join(base,'*','*.py')):
- path = path[len(base):]
- if path.find('__init__') >= 0: continue
- moduleName = path.replace(os.path.sep, '.')
- moduleName = moduleName.lstrip('.')[:-3]
- module = __import__(moduleName, globals(), locals(), [moduleName])
- allTests.extend(list(module.suite()))
- return allTests
-
-def parseArguments(parser, allTests):
- for test in allTests:
- if hasattr(test, 'add_options'):
- test.add_options(parser)
- options, hosts = parser.parse_args()
- options.hosts = hosts or [socket.getfqdn()]
- return options
-
-def testName(test):
- klass = test.__class__
- return '%s.%s' % (klass.__module__, klass.__name__)
-
-def filterTests(allTests, patterns):
- if not patterns:
- return allTests
- filtered = []
- for test in allTests:
- name = testName(test)
- for pattern in patterns:
- if re.search(pattern, name, re.IGNORECASE):
- filtered.append(test)
- break
- else:
- log.debug("Test %s filtered out", name)
- return filtered
-
-def sortTests(tests):
- def compare(t1, t2):
- result = cmp(getattr(t1, 'order', 50), getattr(t2, 'order', 50))
- if result == 0:
- return cmp(testName(t1), testName(t2))
- return result
- copy = tests[:]
- copy.sort(compare)
- return copy
-
-def assignOptions(tests, options):
- for test in tests:
- test.options = options
-
-def run(cmd, **kwargs):
- log.debug("Running %s", ' '.join(cmd))
- handle = Popen(cmd, stdout=PIPE, **kwargs)
- out, err = handle.communicate()
- log.debug("Result %d (%r, %r)", handle.returncode, out, err)
- return handle.returncode
-
-def fixCoberturaShellScripts():
- "unDOS-ify the scripts"
- shellScripts = glob.glob(os.path.join(COBERTURA_HOME,'*.sh'))
- run(['sed', '-i', r's/\r//'] + shellScripts)
- run(['chmod', '+x'] + shellScripts)
-
-def removeCoverageFromPreviousRun():
- """If the class files change between runs, we get confusing results.
- We might be able to remove the files only if they are older than the
- jar file"""
- for f in (os.path.join(os.environ['HOME'], 'cobertura.ser'),
- 'cobertura.ser'):
- try:
- os.unlink(f)
- except OSError:
- pass
-
-def instrumentAccumuloJar(jar):
- instrumented = jar[:-4] + "-instrumented" + ".jar"
- try:
- os.unlink(instrumented)
- except OSError:
- pass
- os.link(jar, instrumented)
- cmd = os.path.join(COBERTURA_HOME, "cobertura-instrument.sh")
- run(['sh', '-c', '%s --includeClasses "accumulo.*" %s' % (
- cmd, instrumented)])
- assert os.path.exists('cobertura.ser')
- return instrumented
-
-def mergeCoverage():
- "Most of the coverage ends up in $HOME due to ssh'ing around"
- fname = 'cobertura.ser'
- run(['sh', '-c', ' '.join([
- os.path.join(COBERTURA_HOME, "cobertura-merge.sh"),
- os.path.join(os.environ['HOME'], fname),
- fname])])
-
-def produceCoverageReport(sourceDirectories):
- reporter = os.path.join(COBERTURA_HOME, 'cobertura-report.sh')
- run(['sh', '-c', ' '.join([reporter,
- '--destination', os.path.join(ACCUMULO_HOME,'test','reports','cobertura-xml'),
- '--format', 'xml',
- '--datafile', 'cobertura.ser'] +
- sourceDirectories)])
- run(['sh', '-c', ' '.join([reporter,
- '--destination', os.path.join(ACCUMULO_HOME,'test','reports','cobertura-html'),
- '--format', 'html',
- '--datafile', 'cobertura.ser'] +
- sourceDirectories)])
-
-class _TextTestResult(unittest.TestResult):
- """A test result class that can print formatted text results to a stream.
-
- Used by TextTestRunner.
- """
- separator1 = '=' * 70
- separator2 = '-' * 70
-
- def __init__(self, stream, descriptions):
- unittest.TestResult.__init__(self)
- self.stream = stream
- self.descriptions = descriptions
-
- def getDescription(self, test):
- if self.descriptions:
- return test.shortDescription() or str(test)
- else:
- return str(test)
-
- def startTest(self, test):
- unittest.TestResult.startTest(self, test)
- d = self.getDescription(test)
- self.stream.write(time.strftime('%T ', time.localtime()))
- self.stream.write(d)
- self.stream.write(" .%s. " % ('.' * (65 - len(d))) )
-
- def addSuccess(self, test):
- unittest.TestResult.addSuccess(self, test)
- self.stream.writeln("ok")
-
- def addError(self, test, err):
- unittest.TestResult.addError(self, test, err)
- self.stream.writeln("ERROR")
- self.printErrorList('ERROR', self.errors[-1:])
-
- def addFailure(self, test, err):
- unittest.TestResult.addFailure(self, test, err)
- self.stream.writeln("FAIL")
- self.printErrorList('FAIL', self.failures[-1:])
-
- def printErrors(self):
- self.stream.writeln()
- self.printErrorList('ERROR', self.errors)
- self.printErrorList('FAIL', self.failures)
-
- def printErrorList(self, flavour, errors):
- for test, err in errors:
- self.stream.writeln(self.separator1)
- self.stream.writeln("%s: %s" % (flavour,self.getDescription(test)))
- self.stream.writeln(self.separator2)
- self.stream.writeln("%s" % err)
-
-class TestRunner(unittest.TextTestRunner):
- def _makeResult(self):
- return _TextTestResult(self.stream, self.descriptions)
-
-
-def makeDiskFailureLibrary():
- def dir(n):
- return os.path.join(ACCUMULO_HOME, "test/system/auto", n)
- def compile():
- fake_disk_failure = dir('fake_disk_failure')
- if sys.platform != 'darwin':
- cmd = 'gcc -D_GNU_SOURCE -Wall -fPIC %s.c -shared -o %s.so -ldl' % (fake_disk_failure, fake_disk_failure)
- else:
- cmd = 'gcc -arch x86_64 -arch i386 -dynamiclib -O3 -fPIC %s.c -o %s.so' % (fake_disk_failure, fake_disk_failure)
- log.debug(cmd)
- os.system(cmd)
- try:
- if os.stat(fake_disk_failure + '.c').st_mtime > os.stat(fake_disk_failure + '.so'):
- compile()
- except:
- compile()
-
-def main():
- makeDiskFailureLibrary()
-
- from optparse import OptionParser
- usage = "usage: %prog [options] [host1 [host2 [hostn...]]]"
- parser = OptionParser(usage)
- parser.add_option('-l', '--list', dest='list', action='store_true',
- default=False)
- parser.add_option('-v', '--level', dest='logLevel',
- default=logging.WARN, type=int,
- help="The logging level (%default)")
- parser.add_option('-t', '--test', dest='tests',
- default=[], action='append',
- help="A regular expression for the test to run.")
- parser.add_option('-C', '--coverage', dest='coverage',
- default=False, action='store_true',
- help="Produce a coverage report")
- parser.add_option('-r', '--repeat', dest='repeat',
- default=1, type=int,
- help='Number of times to repeat the tests')
- parser.add_option('-d', '--dirty', dest='clean',
- default=True, action='store_false',
- help='Do not clean up at the end of the test.')
- parser.add_option('-s', '--start', dest='start', default=None,
- help='Start the test list at the given test name')
- parser.add_option('-x', '--xml', dest='xmlreport', default=False, action='store_true',
- help='Output tests results to xml (jenkins conpatible)')
- parser.add_option('-f', '--timeout-factor', dest='timeout_factor',
- default=1, type=int,
- help="Multiplier for some timeouts (use on slower hardware) (%default)")
-
- allTests = getTests()
- options = parseArguments(parser, allTests)
-
- logging.basicConfig(level=options.logLevel)
- filtered = filterTests(allTests, options.tests)
- filtered = sortTests(filtered)
-
- if options.start:
- while filtered:
- if re.search(options.start, testName(filtered[0]), re.IGNORECASE):
- break
- filtered = filtered[1:]
-
- if options.list:
- for test in filtered:
- print testName(test)
- sys.exit(0)
-
- os.system("hadoop dfs -rmr %s >/dev/null 2>&1 < /dev/null" % ACCUMULO_DIR)
-
- assignOptions(filtered, options)
-
- if not os.environ.get('ZOOKEEPER_HOME', None):
- print "ZOOKEEPER_HOME needs to be set"
- sys.exit(1)
-
- if options.xmlreport:
- import xmlrunner
- runner = xmlrunner.XMLTestRunner(output='test-reports')
- else:
- runner = TestRunner()
-
-
- suite = unittest.TestSuite()
- map(suite.addTest, filtered)
-
- if options.coverage:
- fixCoberturaShellScripts()
- removeCoverageFromPreviousRun()
- os.environ['HADOOP_CLASSPATH'] = os.path.join(COBERTURA_HOME,
- 'cobertura.jar')
- sleep.scale = 2.0
-
- for i in range(options.repeat):
- runner.run(suite)
-
- if options.coverage:
- mergeCoverage()
- produceCoverageReport(
- [os.path.join(ACCUMULO_HOME,'src','core','src','main','java'),
- os.path.join(ACCUMULO_HOME,'src','server','src','main','java')]
- )
-
-
-if __name__ == '__main__':
- main()
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/system/auto/simple/__init__.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/__init__.py b/test/system/auto/simple/__init__.py
deleted file mode 100755
index 09697dc..0000000
--- a/test/system/auto/simple/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/system/auto/sleep.py
----------------------------------------------------------------------
diff --git a/test/system/auto/sleep.py b/test/system/auto/sleep.py
deleted file mode 100755
index 62e21e5..0000000
--- a/test/system/auto/sleep.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-scale = 1.0
-
-
-def sleep(secs):
- import time
- time.sleep(secs*scale)
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3ca9872/test/system/auto/stress/__init__.py
----------------------------------------------------------------------
diff --git a/test/system/auto/stress/__init__.py b/test/system/auto/stress/__init__.py
deleted file mode 100755
index 09697dc..0000000
--- a/test/system/auto/stress/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-