Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393435 )
Change subject: Add basic tests via autopkgtest ...................................................................... Add basic tests via autopkgtest autopkgtest is the Debian CI system that is triggered on new package uploads, and whenever any dependencies are updated. The `lint` test runs a PHP linter and a JSON linter. `install-sqlite` sets up MediaWiki with the SQLite backend and then verifies that the installation was successful. More to come! Change-Id: Ia95fd9afc36ff8de6b1934b4f8cf9b8062a9651d --- M debian/changelog A debian/tests/control A debian/tests/install-sqlite A debian/tests/lint 4 files changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian refs/changes/35/393435/1 diff --git a/debian/changelog b/debian/changelog index 8ec2246..a9ac1de 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mediawiki (1:1.27.4-3) UNRELEASED; urgency=medium + + * Add basic tests via autopkgtest + + -- Kunal Mehta <[email protected]> Sat, 25 Nov 2017 16:29:10 -0800 + mediawiki (1:1.27.4-2) unstable; urgency=medium * Bump Standards-Version to 4.1.1 diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..c92a418 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,5 @@ +Tests: lint +Depends: @, php-cli, jsonlint + +Tests: install-sqlite +Depends: @, php-cli, php-sqlite3 diff --git a/debian/tests/install-sqlite b/debian/tests/install-sqlite new file mode 100644 index 0000000..412feb3 --- /dev/null +++ b/debian/tests/install-sqlite @@ -0,0 +1,8 @@ +#!/bin/sh +# Install MediaWiki on the SQLite backend +# and then verify the installation was successful. +set -e + +mkdir /tmp/mw-install +php /var/lib/mediawiki/maintenance/install.php --confpath /tmp/mw-install --dbpath /tmp/mw-install --dbtype sqlite --pass password1 Debian-Autopkgtest Administrator +php /var/lib/mediawiki/maintenance/getText.php --conf /tmp/mw-install/LocalSettings.php "Main_Page" | grep "MediaWiki has been installed" diff --git a/debian/tests/lint b/debian/tests/lint new file mode 100644 index 0000000..f7639e9 --- /dev/null +++ b/debian/tests/lint @@ -0,0 +1,11 @@ +#!/bin/sh +# Lint both PHP and JSON files + +set -e + +# Bool and Null are already fixed upstream: +# <https://github.com/ruflin/Elastica/issues/825> +# Ignore LocalSettings.php since it is just a symlink +# that does not exist yet. +find /usr/share/mediawiki -not -type d -name '*.php' -not -name 'Bool.php' -not -name 'Null.php' -not -name 'LocalSettings.php' | xargs -n1 -exec php -l +find /usr/share/mediawiki -not -type d -name '*.json' | xargs -n1 -exec jsonlint-php -- To view, visit https://gerrit.wikimedia.org/r/393435 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia95fd9afc36ff8de6b1934b4f8cf9b8062a9651d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/debian Gerrit-Branch: master Gerrit-Owner: Legoktm <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
