From f360c64327b2d32e124818c5ef28bd65d57ce2be Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sun, 4 Aug 2019 19:21:09 -0400 Subject: [PATCH] Slight fixes to Robo and PHPUnit --- RoboFile.php | 2 +- robo | 15 +++++++++------ tests/{phpunit.xml => phpunit.dist.xml} | 0 3 files changed, 10 insertions(+), 7 deletions(-) rename tests/{phpunit.xml => phpunit.dist.xml} (100%) diff --git a/RoboFile.php b/RoboFile.php index 2bd341c..2dc7c24 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -119,7 +119,7 @@ class RoboFile extends \Robo\Tasks { throw new \Exception; } $execpath = realpath(self::BASE."vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit"); - $confpath = realpath(self::BASE_TEST."phpunit.xml"); + $confpath = realpath(self::BASE_TEST."phpunit.dist.xml") ?: realpath(self::BASE_TEST."phpunit.xml"); $this->taskServer(8000)->host("localhost")->dir(self::BASE_TEST."docroot")->rawArg("-n")->arg(self::BASE_TEST."server.php")->rawArg($this->blackhole())->background()->run(); return $this->taskExec($executor)->arg($execpath)->option("-c", $confpath)->args(array_merge($set, $args))->run(); } diff --git a/robo b/robo index f525941..e096c36 100755 --- a/robo +++ b/robo @@ -1,11 +1,14 @@ #! /bin/sh base=`dirname "$0"` roboCommand="$1" -shift - -ulimit -n 2048 -if [ "$1" = "clean" ]; then - "$base/vendor/bin/robo" "$roboCommand" "$@" +if [ $# -eq 0 ]; then + "$base/vendor/bin/robo" else - "$base/vendor/bin/robo" "$roboCommand" -- "$@" + shift + ulimit -n 2048 + if [ "$1" = "clean" ]; then + "$base/vendor/bin/robo" "$roboCommand" "$@" + else + "$base/vendor/bin/robo" "$roboCommand" -- "$@" + fi fi diff --git a/tests/phpunit.xml b/tests/phpunit.dist.xml similarity index 100% rename from tests/phpunit.xml rename to tests/phpunit.dist.xml