Cscott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/79280


Change subject: Create appropriate LocalSettings.php to allow 
parsoid-php-parsertests to run.
......................................................................

Create appropriate LocalSettings.php to allow parsoid-php-parsertests to run.

We want to run the parsoid parsertests with the php parser to ensure
interoperability. But we need to create a stub LocalSettings.php in order
to make the PHP parser happy.  Use the same technique used by the
mw-install-sqlite builder in macro.yaml to set things up with a local
sqlite database so we can run our tests.

Change-Id: I2a2cfd5ca174ea2c69e428245b9ed88e2e0635e3
---
M parsoid.yaml
1 file changed, 21 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/80/79280/1

diff --git a/parsoid.yaml b/parsoid.yaml
index f567ed6..28360d9 100644
--- a/parsoid.yaml
+++ b/parsoid.yaml
@@ -81,9 +81,27 @@
         # run our parserTests.txt file using core's php parser to ensure
         # that non-parsoid only tests are actually correct wrt the PHP parser.
         - shell: |
-            # If any of these commands fail, something is wrong
-            set -e
-            php core/tests/parserTests.php --color=no 
--file=js/tests/parserTests.txt --quiet
+          #!/bin/bash -xe
+          sqlitedir="$WORKSPACE/data"
+          mkdir -p $sqlitedir
+          # Ensure LocalSettings.php and my_wiki.sqlite don't exist
+          rm -f core/LocalSettings.php
+          rm -f "$sqlitedir/my_wiki.sqlite"
+          # Run MediaWiki installer to create LocalSettings.php
+          # (see mw-install-sqlite builder in macro.yaml)
+          php core/maintenance/install.php \
+          --confpath $WORKSPACE/core \
+          --dbtype=sqlite \
+          --dbname=my_wiki \
+          --dbpath=$sqlitedir \
+          --showexceptions=true \
+          --pass testpass \
+          sqlitetest \
+          WikiAdmin
+          chmod +w "$sqlitedir/my_wiki.sqlite"
+          # now run parserTests
+          php core/tests/parserTests.php --color=no --quiet \
+          --file=js/tests/parserTests.txt
 
 - job-template:
     name: parsoid-parsertests

-- 
To view, visit https://gerrit.wikimedia.org/r/79280
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a2cfd5ca174ea2c69e428245b9ed88e2e0635e3
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to