HADOOP-9948. Merging change r1526606 from trunk to branch-2.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1526607 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fa2a3c94f2
commit
e45c32fced
@ -107,6 +107,9 @@ Release 2.1.2 - UNRELEASED
|
|||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
||||||
|
HADOOP-9948. Add a config value to CLITestHelper to skip tests on Windows.
|
||||||
|
(Chuan Liu via cnauroth)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
@ -21,11 +21,10 @@
|
|||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.apache.hadoop.cli.util.*;
|
import org.apache.hadoop.cli.util.*;
|
||||||
import org.apache.hadoop.cli.util.CLITestCmd;
|
|
||||||
import org.apache.hadoop.cli.util.CLICommand;
|
|
||||||
import org.apache.hadoop.cli.util.CommandExecutor.Result;
|
import org.apache.hadoop.cli.util.CommandExecutor.Result;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.CommonConfigurationKeys;
|
import org.apache.hadoop.fs.CommonConfigurationKeys;
|
||||||
|
import org.apache.hadoop.util.Shell;
|
||||||
import org.apache.hadoop.util.StringUtils;
|
import org.apache.hadoop.util.StringUtils;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
import static org.junit.Assert.fail;
|
import static org.junit.Assert.fail;
|
||||||
@ -369,6 +368,7 @@ class TestConfigFileParser extends DefaultHandler {
|
|||||||
CLITestData td = null;
|
CLITestData td = null;
|
||||||
ArrayList<CLICommand> testCommands = null;
|
ArrayList<CLICommand> testCommands = null;
|
||||||
ArrayList<CLICommand> cleanupCommands = null;
|
ArrayList<CLICommand> cleanupCommands = null;
|
||||||
|
boolean runOnWindows = true;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startDocument() throws SAXException {
|
public void startDocument() throws SAXException {
|
||||||
@ -399,6 +399,8 @@ public void endElement(String uri, String localName,String qName)
|
|||||||
throws SAXException {
|
throws SAXException {
|
||||||
if (qName.equals("description")) {
|
if (qName.equals("description")) {
|
||||||
td.setTestDesc(charString);
|
td.setTestDesc(charString);
|
||||||
|
} else if (qName.equals("windows")) {
|
||||||
|
runOnWindows = Boolean.parseBoolean(charString);
|
||||||
} else if (qName.equals("test-commands")) {
|
} else if (qName.equals("test-commands")) {
|
||||||
td.setTestCommands(testCommands);
|
td.setTestCommands(testCommands);
|
||||||
testCommands = null;
|
testCommands = null;
|
||||||
@ -420,8 +422,11 @@ public void endElement(String uri, String localName,String qName)
|
|||||||
} else if (qName.equals("expected-output")) {
|
} else if (qName.equals("expected-output")) {
|
||||||
comparatorData.setExpectedOutput(charString);
|
comparatorData.setExpectedOutput(charString);
|
||||||
} else if (qName.equals("test")) {
|
} else if (qName.equals("test")) {
|
||||||
|
if (!Shell.WINDOWS || runOnWindows) {
|
||||||
testsFromConfigFile.add(td);
|
testsFromConfigFile.add(td);
|
||||||
|
}
|
||||||
td = null;
|
td = null;
|
||||||
|
runOnWindows = true;
|
||||||
} else if (qName.equals("mode")) {
|
} else if (qName.equals("mode")) {
|
||||||
testMode = charString;
|
testMode = charString;
|
||||||
if (!testMode.equals(TESTMODE_NOCOMPARE) &&
|
if (!testMode.equals(TESTMODE_NOCOMPARE) &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user