From 35b36b3502042506bd0f499dfb110bfd6657e2ed Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Wed, 26 May 2010 21:09:55 +0000
Subject: [PATCH] Add support of build.dir redefinition for unit tests By default, most of the files generated at build time are located in <ws>/build. If -Dbuild.dir is used, it is possible to specify another directory. This change allows to run unit-tests in this kind of build environment.
---
opends/tests/unit-tests-testng/src/server/org/opends/messages/MessagesTestCase.java | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/messages/MessagesTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/messages/MessagesTestCase.java
index 90e0952..bc38bf9 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/messages/MessagesTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/messages/MessagesTestCase.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2006-2008 Sun Microsystems, Inc.
+ * Copyright 2006-2010 Sun Microsystems, Inc.
*/
package org.opends.messages;
@@ -65,9 +65,15 @@
corePseudoI18nMsgs.put(keyEnum.nextElement(), TEST_MSG);
}
File buildRoot = new File(System.getProperty(TestCaseUtils.PROPERTY_BUILD_ROOT));
- File corePseudoI18nMsgsFile = new File(buildRoot,
- "build" + File.separator + "unit-tests" +
- File.separator + "classes" +
+ String buildDirStr = System.getProperty(TestCaseUtils.PROPERTY_BUILD_DIR);
+ File buildDir;
+ if (buildDirStr != null) {
+ buildDir = new File(buildDirStr);
+ } else {
+ buildDir = new File(buildRoot, "build");
+ }
+ File corePseudoI18nMsgsFile = new File(buildDir,
+ "unit-tests" + File.separator + "classes" +
File.separator + "messages" +
File.separator + "core_" + TEST_LOCALE.getLanguage() +
".properties");
--
Gitblit v1.10.0