Krinkle has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/383041 )
Change subject: tests: Commit initial version of TestSettings.php
......................................................................
tests: Commit initial version of TestSettings.php
* Store in the tests/ directory.
* Use by default in Travis CI builds.
* Add command-line option to phpunit.php to use it.
* See commit ## for use by Jenkins jobs, which will load it directly
from LocalSettings.php (instead of via phpunit) so that it applies
to web entry points and other maintenance scripts as well.
Bug: T177669
Change-Id: I6e5dc5f0dddc1960761980552ed2bb31e6ae9fd9
---
M .travis.yml
A tests/TestSetttings.php
2 files changed, 42 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/41/383041/1
diff --git a/.travis.yml b/.travis.yml
index cde7193..7ad5929 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -63,6 +63,8 @@
--dbuser "$dbuser"
--dbpass ""
--scriptpath "/w"
+ - echo -en "\n\nrequire_once __DIR__ . '/tests/TestSettings.php';\n" >>
./LocalSettings.php
+ - php -l ./LocalSettings.php
script:
- php tests/phpunit/phpunit.php
diff --git a/tests/TestSetttings.php b/tests/TestSetttings.php
new file mode 100644
index 0000000..741c5d9
--- /dev/null
+++ b/tests/TestSetttings.php
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * Debugging: PHP
+ */
+
+// Enable showing of errors
+error_reporting( -1 );
+ini_set( 'display_errors', 1 );
+
+/**
+ * Debugging: MediaWiki
+ */
+
+// Use of wfWarn() should cause tests to fail
+$wgDevelopmentWarnings = true;
+
+// Enable showing of errors
+$wgShowDBErrorBacktrace = true;
+$wgShowExceptionDetails = true;
+$wgShowSQLErrors = true;
+$wgDebugRawPage = true; // T49960
+
+// Prefix log lines with relative timestamp and memory usage
+$wgDebugTimestamps = true;
+
+// Enable log files
+$logDir = getenv( 'MW_LOG_DIR' );
+if ( $logDir ) {
+ if ( $wgCommandLineMode ) {
+ $wgDebugLogFile = "$logDir/mw-debug-cli.log";
+ } else {
+ $wgDebugLogFile = "$logDir/mw-debug-www.log";
+ }
+ $wgDBerrorLog = "$logDir/mw-dberror.log";
+ $wgDebugLogGroups['ratelimit'] = "$logDir/mw-ratelimit.log";
+ $wgDebugLogGroups['exception'] = "$logDir/mw-exception.log";
+ $wgDebugLogGroups['error'] = "$logDir/mw-error.log";
+}
+unset( $logDir );
--
To view, visit https://gerrit.wikimedia.org/r/383041
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e5dc5f0dddc1960761980552ed2bb31e6ae9fd9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits