MAPREDUCE-3179. Ensure failed tests exit with right error code. Contributed by Jonathan Eagles.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1186552 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2011-10-19 22:54:23 +00:00
parent a6cc9bafa8
commit fc362b1caf
2 changed files with 6 additions and 1 deletions

View File

@ -1703,6 +1703,9 @@ Release 0.23.0 - Unreleased
MAPREDUCE-3212. Fix usage/help message for bin/yarn. (Bhallamudi Venkata MAPREDUCE-3212. Fix usage/help message for bin/yarn. (Bhallamudi Venkata
Siva Kamesh via acmurthy) Siva Kamesh via acmurthy)
MAPREDUCE-3179. Ensure failed tests exit with right error code. (Jonathan
Eagles via acmurthy)
Release 0.22.0 - Unreleased Release 0.22.0 - Unreleased
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -107,11 +107,13 @@ public class MapredTestDriver {
} }
public void run(String argv[]) { public void run(String argv[]) {
int exitCode = -1;
try { try {
pgd.driver(argv); exitCode = pgd.driver(argv);
} catch(Throwable e) { } catch(Throwable e) {
e.printStackTrace(); e.printStackTrace();
} }
System.exit(exitCode);
} }
public static void main(String argv[]){ public static void main(String argv[]){