Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/61379
Change subject: experimental config switcher for WMF Jenkins jobs ...................................................................... experimental config switcher for WMF Jenkins jobs Wikibase would need a client and a server job that would let tweak the default configuration settings. I have created two Jenkins jobs that launch the full PHPUnit file and named: - mwext-Wikibase-client-tests - mwext-Wikibase-server-tests Jenkins provide the job name as the JOB_NAME environnement variable. One can thus detect which job is being run and tweak the PHPUnit setting. For the client job, we insert a `--exclude-group WikidataClient`. Change-Id: Ide41a0b9003a9627f5a86c0514cc61d684b5e6aa --- M Wikibase.php 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/79/61379/1 diff --git a/Wikibase.php b/Wikibase.php index 1313a9f..ba33bfe 100644 --- a/Wikibase.php +++ b/Wikibase.php @@ -28,3 +28,27 @@ //require_once __DIR__ . '/client/ExampleSettings.php'; require_once __DIR__ . '/repo/ExampleSettings.php'; + +# Let JenkinsAdapt our test suite when run under Jenkins +$jenkins_job_name = getenv( 'JOB_NAME' ); +if( PHP_SAPI === 'cli' && $jenkins_job_name !== false ) { + + switch( $jenkins_job_name) { + + case 'mwext-Wikibase-client-tests': + break; + + case 'mwext-Wikibase-server-tests': + # Pretends we asked PHPUnit to exclude WikidataClient group, + # this is done by inserting an --exclude-group option just after the + # command line. + $cmd = array_shift( $_SERVER['argv'] ); + $_SERVER['argv'] = array_merge( + array( $cmd, '--exclude-group', 'WikidataClient'), + $_SERVER['argv'] + ); + break; + } +} +// Avoid polluting the global namespace +unset( $jenkins_job_name, $cmd ); -- To view, visit https://gerrit.wikimedia.org/r/61379 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ide41a0b9003a9627f5a86c0514cc61d684b5e6aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hashar <has...@free.fr> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits