From 5af5f9575a906324e5a6ca442217bdaa8ec42fa0 Mon Sep 17 00:00:00 2001 From: Colin Patrick Mccabe Date: Fri, 15 Jan 2016 13:53:05 -0800 Subject: [PATCH] HADOOP-12714. Fix hadoop-mapreduce-client-nativetask unit test which fails because it is not able to open the "glibc bug spill" file. (cmccabe) --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../hadoop-mapreduce-client-nativetask/pom.xml | 1 + .../hadoop/maven/plugin/cmakebuilder/TestMojo.java | 9 +++++++++ 3 files changed, 13 insertions(+) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 132d52734bc..f3e6ff892a7 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -691,6 +691,9 @@ Release 2.9.0 - UNRELEASED HADOOP-12712. Fix some cmake plugin and native build warnings (cmccabe) + HADOOP-12714. Fix hadoop-mapreduce-client-nativetask unit test which fails + because it is not able to open the "glibc bug spill" file. (cmccabe) + Release 2.8.0 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/pom.xml b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/pom.xml index 45ba85ed3bc..1f6324c2f56 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/pom.xml +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/pom.xml @@ -209,6 +209,7 @@ cmake-test test-native-task + ${project.build.directory}/native/test ${basedir}/src ${project.build.directory}/native/test/nttest --gtest_filter=-Perf. diff --git a/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/cmakebuilder/TestMojo.java b/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/cmakebuilder/TestMojo.java index 447331b3da0..e676efd1664 100644 --- a/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/cmakebuilder/TestMojo.java +++ b/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/cmakebuilder/TestMojo.java @@ -77,6 +77,12 @@ public class TestMojo extends AbstractMojo { @Parameter(defaultValue="600") private int timeout; + /** + * The working directory to use. + */ + @Parameter + private File workingDirectory; + /** * Path to results directory. */ @@ -307,6 +313,9 @@ public class TestMojo extends AbstractMojo { getLog().info(bld.toString()); ProcessBuilder pb = new ProcessBuilder(cmd); Exec.addEnvironment(pb, env); + if (workingDirectory != null) { + pb.directory(workingDirectory); + } pb.redirectError(new File(results, testName + ".stderr")); pb.redirectOutput(new File(results, testName + ".stdout")); getLog().info("with extra environment variables " + Exec.envToString(env));