Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/266034
Change subject: Allow overriding which `php` executable to use
......................................................................
Allow overriding which `php` executable to use
On our trusty systems, `php` points to HHVM. Since we want to have a
PHP5.5 job, we need to use `php5`. Zuul will set a PHP_BIN variable to
point to `php5` for those jobs.
Bug: T119675
Change-Id: I7163abb3f1edaf1692353ecfe22391350540ab37
---
M bin/mw-apply-settings.sh
M bin/mw-install-mysql.sh
M bin/mw-install-sqlite.sh
M bin/mw-phpunit.sh
M bin/mw-run-phpunit-allexts.sh
M bin/mw-run-phpunit.sh
M bin/mw-run-update-script.sh
M bin/mw-send-to-coveralls.sh
M bin/mw-set-env.sh
9 files changed, 15 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins
refs/changes/34/266034/1
diff --git a/bin/mw-apply-settings.sh b/bin/mw-apply-settings.sh
index 066f4c8..0d8e3eb 100755
--- a/bin/mw-apply-settings.sh
+++ b/bin/mw-apply-settings.sh
@@ -14,7 +14,7 @@
# No PHP tags since _join.php inject them
echo -en "\$wgTmpDirectory = '${MW_TMPDIR}';\n" >> "$LOCAL_SETTINGS"
-php "$MEDIAWIKI_D/_join.php" >> "$LOCAL_SETTINGS"
+$PHP_BIN "$MEDIAWIKI_D/_join.php" >> "$LOCAL_SETTINGS"
echo "Making sure $LOCAL_SETTINGS is still valid"
-php -l "$LOCAL_SETTINGS"
+$PHP_BIN -l "$LOCAL_SETTINGS"
diff --git a/bin/mw-install-mysql.sh b/bin/mw-install-mysql.sh
index 0ce58c4..2c044c1 100755
--- a/bin/mw-install-mysql.sh
+++ b/bin/mw-install-mysql.sh
@@ -10,7 +10,7 @@
# Run MediaWiki installer
cd "$MW_INSTALL_PATH"
-php maintenance/install.php \
+$PHP_BIN maintenance/install.php \
--confpath "$MW_INSTALL_PATH" \
--dbtype=mysql \
--dbserver="$MW_DB_HOST:$MW_DB_PORT" \
diff --git a/bin/mw-install-sqlite.sh b/bin/mw-install-sqlite.sh
index 4fcc187..a33d40f 100755
--- a/bin/mw-install-sqlite.sh
+++ b/bin/mw-install-sqlite.sh
@@ -4,7 +4,7 @@
# Run MediaWiki installer
cd "$MW_INSTALL_PATH"
-php maintenance/install.php \
+$PHP_BIN maintenance/install.php \
--confpath "$MW_INSTALL_PATH" \
--dbtype=sqlite \
--dbpath="$MW_TMPDIR" \
diff --git a/bin/mw-phpunit.sh b/bin/mw-phpunit.sh
index e99948f..23d04ef 100755
--- a/bin/mw-phpunit.sh
+++ b/bin/mw-phpunit.sh
@@ -35,7 +35,7 @@
set -x
cd "${MW_INSTALL_PATH}/tests/phpunit"
-php phpunit.php \
+$PHP_BIN phpunit.php \
--with-phpunitdir "$PHPUNIT_DIR" \
--conf "$MW_INSTALL_PATH/LocalSettings.php" \
--log-junit $JUNIT_DEST \
diff --git a/bin/mw-run-phpunit-allexts.sh b/bin/mw-run-phpunit-allexts.sh
index 63db123..036bc35 100755
--- a/bin/mw-run-phpunit-allexts.sh
+++ b/bin/mw-run-phpunit-allexts.sh
@@ -23,7 +23,7 @@
cd "${MW_INSTALL_PATH}/tests/phpunit"
set -x
-php phpunit.php \
+$PHP_BIN phpunit.php \
--with-phpunitdir "$PHPUNIT_DIR" \
--log-junit "$JUNIT_DEST" \
--testsuite extensions
diff --git a/bin/mw-run-phpunit.sh b/bin/mw-run-phpunit.sh
index acd79a1..3a858f8 100755
--- a/bin/mw-run-phpunit.sh
+++ b/bin/mw-run-phpunit.sh
@@ -82,7 +82,7 @@
set -x
cd "${MW_INSTALL_PATH}/tests/phpunit"
-php phpunit.php \
+$PHP_BIN phpunit.php \
--with-phpunitdir "$PHPUNIT_DIR" \
$PHPUNIT_GROUP_OPT \
--exclude-group "$PHPUNIT_EXCLUDE_GROUP" \
diff --git a/bin/mw-run-update-script.sh b/bin/mw-run-update-script.sh
index 7ea2eff..e46660e 100755
--- a/bin/mw-run-update-script.sh
+++ b/bin/mw-run-update-script.sh
@@ -7,5 +7,5 @@
then
ARGS="$ARGS --skip-external-dependencies"
fi
-php "$MW_INSTALL_PATH/maintenance/update.php" $ARGS
+$PHP_BIN "$MW_INSTALL_PATH/maintenance/update.php" $ARGS
diff --git a/bin/mw-send-to-coveralls.sh b/bin/mw-send-to-coveralls.sh
index 00e0246..3a1b782 100755
--- a/bin/mw-send-to-coveralls.sh
+++ b/bin/mw-send-to-coveralls.sh
@@ -18,4 +18,4 @@
echo "json_path: log/coveralls-upload.json" >> .coveralls.yml
# Actually run coveralls!
-php vendor/bin/coveralls --verbose
+$PHP_BIN vendor/bin/coveralls --verbose
diff --git a/bin/mw-set-env.sh b/bin/mw-set-env.sh
index 78c14f6..f3f0f66 100755
--- a/bin/mw-set-env.sh
+++ b/bin/mw-set-env.sh
@@ -29,3 +29,9 @@
export MW_DB_PASS="pw_jenkins_u${EXECUTOR_NUMBER}"
export LOG_DIR="$WORKSPACE/log"
+
+# Set PHP_BIN to a default if it's not already set by Zuul
+if [[ -n $PHP_BIN ]]; then
+ export PHP_BIN="php"
+fi;
+
--
To view, visit https://gerrit.wikimedia.org/r/266034
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7163abb3f1edaf1692353ecfe22391350540ab37
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits