EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/206171

Change subject: Install a basic Makefile for CirrusSearch
......................................................................

Install a basic Makefile for CirrusSearch

This makefile does a few basic repetative things, such as linting
php and message files, along with running phpunit or browser tests

Change-Id: Ifd7c8d8c25578c534776d0aa4859b69f16f7d6f2
---
A Makefile
1 file changed, 32 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/71/206171/1

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f4e6845
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,32 @@
+MW_INSTALL_PATH ?= ../..
+
+# mediawiki-vagrant defaults to hhvm rather than php5, which is mostly
+# fine but crazy slow for commands like phplint
+PHP ?= `command -v php5 || command -v php`
+
+lint: phplint grunt
+
+phplint:
+       @find ./ -type f -iname '*.php' -print0 | xargs -0 -P 12 -L 1 ${PHP} -l
+
+nodecheck:
+       @which npm > /dev/null && npm install \
+               || (echo "You need to install Node.JS and npm! See 
http://nodejs.org/"; && \
+                   echo "Or just try `apt-get install nodejs nodejs-legacy 
npm`" && false)
+
+gruntcheck: nodecheck
+       @which grunt > /dev/null || (echo "grunt-cli not installed, installing 
now" && \
+               sudo npm install -g grunt-cli)
+
+grunt: gruntcheck
+       @grunt test
+
+phpunit:
+       @${PHP} ${MW_INSTALL_PATH}/tests/phpunit/phpunit.php 
${MW_INSTALL_PATH}/extensions/CirrusSearch/tests/unit/
+
+bundlecheck:
+       @which bundle > /dev/null && cd tests/browser && bundle install \
+               || ( echo "You need to install bundler! See http://bundler.io/"; 
&& \
+                    echo "Or just try `apt-get install bundler`" && false)
+browsertest: bundlecheck
+       @cd tests/browser && . ./selenium_exports_for_vagrant.sh && bundle exec 
cucumber features/ -f pretty

-- 
To view, visit https://gerrit.wikimedia.org/r/206171
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd7c8d8c25578c534776d0aa4859b69f16f7d6f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to