Repository: reef
Updated Branches:
  refs/heads/master 35ed753df -> 038b24dc6


[REEF-1535] Fix .\bin\runtests.ps1 and add -Yarn command line flag to it.

   * Use the new cmdlet name `SubmitYarnApplication`
   * Add new command line parameter `-Yarn`
   * Disable positional binding for cmdlet parameters

JIRA: [REEF-1535](https://issues.apache.org/jira/browse/REEF-1535) closes


Project: http://git-wip-us.apache.org/repos/asf/reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/038b24dc
Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/038b24dc
Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/038b24dc

Branch: refs/heads/master
Commit: 038b24dc699f2d0f3d5b682ceedb09fae3c677c0
Parents: 35ed753
Author: Sergiy Matusevych <[email protected]>
Authored: Thu Aug 18 17:08:49 2016 -0700
Committer: Boris Shulman <[email protected]>
Committed: Fri Aug 19 09:07:03 2016 -0700

----------------------------------------------------------------------
 bin/runtests.ps1 | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/reef/blob/038b24dc/bin/runtests.ps1
----------------------------------------------------------------------
diff --git a/bin/runtests.ps1 b/bin/runtests.ps1
index 3b376a0..330b0f5 100644
--- a/bin/runtests.ps1
+++ b/bin/runtests.ps1
@@ -24,15 +24,19 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 #>
+[CmdletBinding(PositionalBinding=$False)]
 param
   (
     # JAR file(s) to add to the classpath.
-    [Parameter(Mandatory=$True, HelpMessage="JAR file(s) to use")]
+    [Parameter(Mandatory=$True, HelpMessage="Semicolon-separated list of JARs 
to use")]
     [string]$Jars,
 
-    [Parameter(Mandatory=$False, HelpMessage="Options to be passed to java")]
+    [Parameter(Mandatory=$False, HelpMessage="Options to be passed to Java")]
     [string]$JavaOptions,
 
+    [Parameter(HelpMessage="Run unit tests on YARN.")]
+    [switch]$Yarn,
+
     [Parameter(HelpMessage="Turn on detailed logging.")]
     [switch]$VerboseLog,
 
@@ -43,6 +47,13 @@ param
 Import-Module ((Split-Path -Parent -Resolve 
$MyInvocation.MyCommand.Definition) + "\runreef.psm1")
 
 if ((Split-Path -Leaf 
$MyInvocation.MyCommand.Definition).Equals("runtests.ps1")) {
-  $env:REEF_TEST_YARN = "true"
-  Submit-YARN-Application -Jars ($Jars -split ';') -Class 
org.junit.runner.JUnitCore -JavaOptions $JavaOptions -VerboseLog:$VerboseLog 
-Arguments $Tests
+
+  $env:REEF_TEST_YARN = $Yarn.IsPresent
+
+  SubmitYarnApplication `
+    -Jars ($Jars -split ';') `
+    -Class org.junit.runner.JUnitCore `
+    -JavaOptions $JavaOptions `
+    -VerboseLog:$VerboseLog.IsPresent `
+    -Arguments $Tests
 }

Reply via email to