jenkins-bot has submitted this change and it was merged.
Change subject: Fix broken Makefile
......................................................................
Fix broken Makefile
This task fixes broken Makefile tasks and allows to execute tests via make
command again.
Changes:
- extend nodecheck.sh script to install nodemodules under specific directory
(passed as a param)
- use local grunt file (node_modules/grunt/bin/grunt)
- pass --wiki param when executing phpunit tests
Bug: T150048
Change-Id: I29bb688eb2f1f1bb5d674fd945df0dbe40e86614
---
M Makefile
M dev-scripts/nodecheck.sh
2 files changed, 17 insertions(+), 6 deletions(-)
Approvals:
jenkins-bot: Verified
Phuedx: Looks good to me, approved
diff --git a/Makefile b/Makefile
index e2a0c56..429923e 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,10 @@
ifndef MW_INSTALL_PATH
$(error MW_INSTALL_PATH is not set. Please set it to your root mediawiki
installation.)
endif
+GRUNT=${MW_INSTALL_PATH}/extensions/MobileFrontend/node_modules/grunt/bin/grunt
+WIKI=wiki
+PROJECT=MobileFrontend
+
# From https://gist.github.com/prwhite/8168133
help: ## Show this help message
@@ -38,14 +42,17 @@
nodecheck:
@dev-scripts/nodecheck.sh
+mwnodecheck:
+ @dev-scripts/nodecheck.sh ${MW_INSTALL_PATH}
+
jscs: nodecheck ## Check the JavaScript coding style
- @grunt jscs
+ @${GRUNT} jscs
jshinttests: nodecheck ## Lint the JS tests
- @grunt jshint:tests
+ @${GRUNT} jshint:tests
jshint: nodecheck ## Lint the JavaScript files
- @grunt jshint
+ @${GRUNT} jshint
dependencies: nodecheck kssnodecheck phpcheck remotes
@@ -56,10 +63,10 @@
@php composer.phar test
phpunit: ## Run the PHPUnit test suite
- cd ${MW_INSTALL_PATH}/tests/phpunit && php phpunit.php --group
MobileFrontend ${MW_INSTALL_PATH}/extensions/MobileFrontend/tests/phpunit
+ cd ${MW_INSTALL_PATH}/tests/phpunit && php phpunit.php --wiki ${WIKI}
--group ${PROJECT} ${MW_INSTALL_PATH}/extensions/MobileFrontend/tests/phpunit
-qunit: ## Run the QUnit test suite
- cd ${MW_INSTALL_PATH} && grunt qunit
+qunit: mwnodecheck ## Run the QUnit test suite
+ cd ${MW_INSTALL_PATH} && node_modules/grunt/bin/grunt qunit
tests: jshint phplint phpunit qunit ## Run the PHPUnit test suite after
linting
diff --git a/dev-scripts/nodecheck.sh b/dev-scripts/nodecheck.sh
index b397b9f..1b56842 100755
--- a/dev-scripts/nodecheck.sh
+++ b/dev-scripts/nodecheck.sh
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
if command -v npm > /dev/null ; then
+ if [ -n "$1" ] ; then
+ echo "Install modules under $1"
+ cd "$1"
+ fi
npm install
else
echo "You need to install Node.JS and NPM!"
--
To view, visit https://gerrit.wikimedia.org/r/319904
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I29bb688eb2f1f1bb5d674fd945df0dbe40e86614
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Pmiazga <[email protected]>
Gerrit-Reviewer: Bmansurov <[email protected]>
Gerrit-Reviewer: Phuedx <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits