Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added better cmdline option for windows

  • Loading branch information...
commit 6ffd2cfe41f46213c3ae938e9366ee77d6a2187b 1 parent 21778a8
@jlipps authored
Showing with 8 additions and 9 deletions.
  1. +2 −2 README.md
  2. +6 −7 bin/paraunit
View
4 README.md
@@ -12,8 +12,8 @@ Usage
-----
Install using composer. Then do this:
-```vendor/bin/paraunit -p[PROCESSES] --PATH=TEST_PATH/TEST_GLOB
---PHPUNIT=PATH/TO/PHPUNIT```
+```vendor/bin/paraunit (-pPROCESSES|--processes=PROCESSES) --path=TEST_PATH/TEST_GLOB
+--phpunit=PATH/TO/PHPUNIT```
Todo
----
View
13 bin/paraunit
@@ -190,14 +190,16 @@ $PHPUNIT = dirname(__FILE__).'/../../../bin/phpunit';
function main($argv)
{
global $PHPUNIT;
- $usage = "Usage: paraunit -p[NUM_PROCESSES] --path=TEST_PATH/TEST_GLOB --phpunit=PATH/TO/PHPUNIT\n";
+ $usage = "Usage: paraunit (-p[NUM_PROCESSES]|--processes=[NUM_PROCESSES]) --path=TEST_PATH/TEST_GLOB --phpunit=PATH/TO/PHPUNIT\n";
if (!isset($argv[1]) || !$argv[1])
die($usage);
- $opts = getopt("p::", array('path:', 'phpunit::'));
+ $opts = getopt("p::", array('path:', 'phpunit::', 'processes::'));
if (!isset($opts['path']))
die($usage);
- if (isset($opts['p']) && intval($opts['p']) > 0)
+ if (isset($opts['processes']) && intval($opts['processes']) > 0)
+ $processes = intval($opts['processes']);
+ elseif (isset($opts['p']) && intval($opts['p']) > 0)
$processes = intval($opts['p']);
else
$processes = 1;
@@ -211,10 +213,7 @@ function main($argv)
if ($PHPUNIT != 'phpunit' && !is_file($PHPUNIT))
die("Couldn't find phpunit at '$PHPUNIT'\n");
- echo "Using phpunit at $PHPUNIT...\n";
-
- //if ($opts['path'][0] != '/')
- //$opts['path'] = getcwd().'/'.$opts['path'];
+ echo "Using phpunit in $processes process(es) with $PHPUNIT\n";
$files = getFiles($opts['path'], getcwd());
Please sign in to comment.
Something went wrong with that request. Please try again.