From c3bcfad10965a6e120add659aac29333cae7c70b Mon Sep 17 00:00:00 2001
From: coulbeck <coulbeck@localhost>
Date: Thu, 17 May 2007 22:22:31 +0000
Subject: [PATCH] For convenience allow build -Dtest.methods=class#method.  For example to cut and paste a method from the test report into the -Dtest.methods parameter.

---
 opends/src/build-tools/org/opends/build/tools/PrepTestNG.java |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/opends/src/build-tools/org/opends/build/tools/PrepTestNG.java b/opends/src/build-tools/org/opends/build/tools/PrepTestNG.java
index 71804c6..051d1ed 100644
--- a/opends/src/build-tools/org/opends/build/tools/PrepTestNG.java
+++ b/opends/src/build-tools/org/opends/build/tools/PrepTestNG.java
@@ -208,7 +208,12 @@
                 methodLine = mhd.split(",");
                 if(methodLine.length > 0)
                 {
-                  methodNameStartIdx = methodLine[0].lastIndexOf(".");
+                  // Allow class.method or class#method
+                  methodNameStartIdx = methodLine[0].lastIndexOf("#");
+                  if (methodNameStartIdx == -1)
+                  {
+                    methodNameStartIdx = methodLine[0].lastIndexOf(".");
+                  }
                   methodClass = methodLine[0].substring(0,
                                   methodNameStartIdx);
                   methodName = methodLine[0].substring(methodNameStartIdx + 1,

--
Gitblit v1.10.0