Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benakamoorthi@fastmail.fm>2014-08-11 13:25:13 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2014-08-11 13:25:50 +0400
commit149088add54700fff6580c92aa13667e93ff86df (patch)
tree428daca7e2877c526e8a06c0db6a3a90578c4c3a /plugins
parent99bad12164d337cf1d89eea7c7149330b9ab5a64 (diff)
Add check for tests to travis.yml generation so generation does not occur if plugin has no tests.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreConsole/TravisYmlView.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/CoreConsole/TravisYmlView.php b/plugins/CoreConsole/TravisYmlView.php
index ee74d7c6ad..8516c2aff8 100644
--- a/plugins/CoreConsole/TravisYmlView.php
+++ b/plugins/CoreConsole/TravisYmlView.php
@@ -11,6 +11,7 @@ namespace Piwik\Plugins\CoreConsole;
use Piwik\View;
use Symfony\Component\Console\Output\OutputInterface;
+use Exception;
/**
* View class for the travis.yml.twig template file. Generates the contents for a .travis.yml file.
@@ -202,6 +203,10 @@ class TravisYmlView extends View
'env' => 'TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL');
}
+ if (empty($testsToRun)) {
+ throw new Exception("No tests to run for this plugin, aborting .travis.yml generation.");
+ }
+
return array($testsToRun, $testsToExclude);
}