You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by br...@apache.org on 2014/03/06 17:00:52 UTC
svn commit: r1574938 - in /hive/trunk/testutils/ptest2/src:
main/java/org/apache/hive/ptest/execution/ main/resources/
test/java/org/apache/hive/ptest/execution/
Author: brock
Date: Thu Mar 6 16:00:52 2014
New Revision: 1574938
URL: http://svn.apache.org/r1574938
Log:
HIVE-6487 - PTest2 do not copy failed source directories (Szehon via Brock)
Modified:
hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/HostExecutor.java
hive/trunk/testutils/ptest2/src/main/resources/batch-exec.vm
hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testAlternativeTestJVM.approved.txt
hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
Modified: hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/HostExecutor.java
URL: http://svn.apache.org/viewvc/hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/HostExecutor.java?rev=1574938&r1=1574937&r2=1574938&view=diff
==============================================================================
--- hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/HostExecutor.java (original)
+++ hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/HostExecutor.java Thu Mar 6 16:00:52 2014
@@ -54,7 +54,6 @@ import com.google.common.util.concurrent
import com.google.common.util.concurrent.ListeningExecutorService;
class HostExecutor {
- private static final int MAX_SOURCE_DIRS = 5;
private final Host mHost;
private final List<Drone> mDrones;
private final ListeningExecutorService mExecutor;
@@ -212,8 +211,6 @@ class HostExecutor {
templateVariables.put("testArguments", batch.getTestArguments());
templateVariables.put("localDir", drone.getLocalDirectory());
templateVariables.put("logDir", drone.getLocalLogDirectory());
- templateVariables.put("maxSourceDirs", String.valueOf(MAX_SOURCE_DIRS));
- templateVariables.put("numOfFailedTests", String.valueOf(failedTestResults.size()));
String command = Templates.getTemplateResult("bash $localDir/$instanceName/scratch/" + script.getName(),
templateVariables);
Templates.writeTemplateResult("batch-exec.vm", script, templateVariables);
@@ -242,13 +239,6 @@ class HostExecutor {
}
copyFromDroneToLocal(drone, batchLogDir.getAbsolutePath(),
drone.getLocalLogDirectory() + "/");
- if(failedTestResults.size() > MAX_SOURCE_DIRS) {
- File sourceDir = new File(batchLogDir, "source");
- if(sourceDir.isDirectory()) {
- mLogger.info("Max source directories exceeded, deleting " + sourceDir.getAbsolutePath()
- + ":" + FileUtils.deleteQuietly(sourceDir));
- }
- }
File logFile = new File(batchLogDir, String.format("%s.txt", batch.getName()));
PrintWriter writer = new PrintWriter(logFile);
writer.write(String.format("result = '%s'\n", sshResult.toString()));
Modified: hive/trunk/testutils/ptest2/src/main/resources/batch-exec.vm
URL: http://svn.apache.org/viewvc/hive/trunk/testutils/ptest2/src/main/resources/batch-exec.vm?rev=1574938&r1=1574937&r2=1574938&view=diff
==============================================================================
--- hive/trunk/testutils/ptest2/src/main/resources/batch-exec.vm (original)
+++ hive/trunk/testutils/ptest2/src/main/resources/batch-exec.vm Thu Mar 6 16:00:52 2014
@@ -86,15 +86,6 @@ fi
echo $pid >> batch.pid
wait $pid
ret=$?
-if [[ $ret -ne 0 ]]
-then
- if [[ $numOfFailedTests -lt $maxSourceDirs ]]
- then
- cp -R $localDir/$instanceName/${repositoryName}-source $logDir/source
- else
- echo "Number of failed tests $numOfFailedTests exceeded threshold, not copying source"
- fi
-fi
find ./ -type f -name hive.log | \
xargs -I {} sh -c 'f=$(basename {}); test -f ${logDir}/$f && f=$f-$(uuidgen); mv {} ${logDir}/$f'
find ./ -type f -name 'TEST-*.xml' | \
Modified: hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testAlternativeTestJVM.approved.txt
URL: http://svn.apache.org/viewvc/hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testAlternativeTestJVM.approved.txt?rev=1574938&r1=1574937&r2=1574938&view=diff
==============================================================================
--- hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testAlternativeTestJVM.approved.txt (original)
+++ hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testAlternativeTestJVM.approved.txt Thu Mar 6 16:00:52 2014
@@ -85,15 +85,6 @@ fi
echo $pid >> batch.pid
wait $pid
ret=$?
-if [[ $ret -ne 0 ]]
-then
- if [[ 20 -lt 5 ]]
- then
- cp -R /some/local/dir/instance-1/apache-source /some/log/dir/source
- else
- echo "Number of failed tests 20 exceeded threshold, not copying source"
- fi
-fi
find ./ -type f -name hive.log | \
xargs -I {} sh -c 'f=$(basename {}); test -f /some/log/dir/$f && f=$f-$(uuidgen); mv {} /some/log/dir/$f'
find ./ -type f -name 'TEST-*.xml' | \
Modified: hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
URL: http://svn.apache.org/viewvc/hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt?rev=1574938&r1=1574937&r2=1574938&view=diff
==============================================================================
--- hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt (original)
+++ hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt Thu Mar 6 16:00:52 2014
@@ -85,15 +85,6 @@ fi
echo $pid >> batch.pid
wait $pid
ret=$?
-if [[ $ret -ne 0 ]]
-then
- if [[ 20 -lt 5 ]]
- then
- cp -R /some/local/dir/instance-1/apache-source /some/log/dir/source
- else
- echo "Number of failed tests 20 exceeded threshold, not copying source"
- fi
-fi
find ./ -type f -name hive.log | \
xargs -I {} sh -c 'f=$(basename {}); test -f /some/log/dir/$f && f=$f-$(uuidgen); mv {} /some/log/dir/$f'
find ./ -type f -name 'TEST-*.xml' | \