MarkTraceur has submitted this change and it was merged.

Change subject: Add some more Parsoid tests for other components
......................................................................


Add some more Parsoid tests for other components

Testing, now, the API, the parse.js tool, and the roundtrip-test utility.
More to come, maybe, in the future.

Fixed it up a bit.

Change-Id: I06a184d87b1bf8eaf7bd9db07893b6c7020fdef7
---
M parsoid.yaml
1 file changed, 109 insertions(+), 0 deletions(-)

Approvals:
  MarkTraceur: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/parsoid.yaml b/parsoid.yaml
index bbac598..a9fd295 100644
--- a/parsoid.yaml
+++ b/parsoid.yaml
@@ -29,6 +29,8 @@
     name: parsoid-parsertests-run
     defaults:
         use-zuul
+    triggers:
+        - zuul
     scm:
         - git:
             url: '/var/lib/zuul/git/mediawiki/extensions/Parsoid'
@@ -71,11 +73,17 @@
             types:
                 - junit:
                     pattern: diff.xml
+            thresholdmode: 'number'
+            thresholds:
+                - failed:
+                    failurenew: '0'
 
 - job-template:
     name: parsoid-regressions
     defaults:
         use-zuul
+    triggers:
+        - zuul
     builders:
         - parsoid-parsertests-run
     publishers:
@@ -88,6 +96,104 @@
                 - failed:
                     failurenew: '1'
 
+#- job-template:
+#    name: parsoid-server-sanity-check
+#    defaults:
+#        use-zuul
+#    triggers:
+#        - zuul
+#    scm:
+#        - git:
+#            url: '/var/lib/zuul/git/mediawiki/extensions/Parsoid'
+#            refspec: '$ZUUL_REF'
+#            name: 'origin'
+#            disable-submodules: true
+#        - git:
+#            url: 
'https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Parsoid/js/contrib.git'
+#            branches:
+#                - master
+#            basedir: contrib
+#    builders:
+#        - shell: |
+#            # If any of these commands fail, something is wrong
+#            set -e
+#            cd js/api
+#            NODE_PATH=$NODE_PATH:../../contrib/node_modules
+#            # Build a unique string so we can kill the process later
+#            UNIQUESTRING="parsoidserver-$ZUUL_UUID$ZUUL_COMMIT"
+#            daemon --inherit --name=$UNIQUESTRING node server.js
+#            # Wait for the server to start up
+#            sleep 5
+#            cd ../..
+#            # Pull the standard test article
+#            curl localhost:8000/fr/Barack_Obama -D headers.html > output.html
+#            # Kill that process we started
+#            daemon --stop --name=$UNIQUESTRING
+#            # Make sure the response from the server was a 200 OK.
+#            grep "^HTTP.*200 OK" headers.txt
+
+- job-template:
+    name: parsoid-parse-tool-check
+    wrappers:
+        - timeout:
+            timeout: 5
+            fail: true
+    defaults:
+        use-zuul
+    triggers:
+        - zuul
+    scm:
+        - git:
+            url: '/var/lib/zuul/git/mediawiki/extensions/Parsoid'
+            refspec: '$ZUUL_REF'
+            name: 'origin'
+            disable-submodules: true
+        - git:
+            url: 
'https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Parsoid/js/contrib.git'
+            branches:
+                - master
+            basedir: contrib
+    builders:
+        - shell: |
+            # If any of these commands fail, something is wrong
+            set -e
+            cd js/tests
+            NODE_PATH=$NODE_PATH:../../contrib/node_modules
+            echo "[[Link]]s" | node parse.js --wt2wt | grep "\\[\\[Link\\]\\]s"
+            echo "[[Category:{{echo|blah}}]]" | node parse --wt2wt | grep 
"\\[\\[Category:{{echo|blah}}\\]\\]"
+            echo "'''ueoa''aoeu'''ueoa''aoeu" | node parse --wt2wt | grep 
"'''ueoa''aoeu'''ueoa''aoeu"
+
+- job-template:
+    name: parsoid-roundtrip-test-check
+    wrappers:
+        - timeout:
+            timeout: 5
+            fail: true
+    defaults:
+        use-zuul
+    triggers:
+        - zuul
+    scm:
+        - git:
+            url: '/var/lib/zuul/git/mediawiki/extensions/Parsoid'
+            refspec: '$ZUUL_REF'
+            name: 'origin'
+            disable-submodules: true
+        - git:
+            url: 
'https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Parsoid/js/contrib.git'
+            branches:
+                - master
+            basedir: contrib
+    builders:
+        - shell: |
+            # If any of these commands fail, something is wrong
+            set -e
+            cd js/tests
+            NODE_PATH=$NODE_PATH:../../contrib/node_modules
+            node roundtrip-test.js "Barack Obama"
+            node roundtrip-test.js --wiki fr "Chope"
+            node roundtrip-test.js --xml "Parkour"
+
 - project:
     name: parsoid
     gerrit-name: mediawiki/extensions/Parsoid
@@ -95,3 +201,6 @@
         - parsoid-parsertests
         - parsoid-parsertests-run
         - parsoid-regressions
+        - parsoid-server-sanity-check
+        - parsoid-parse-tool-check
+        - parsoid-roundtrip-test-check

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06a184d87b1bf8eaf7bd9db07893b6c7020fdef7
Gerrit-PatchSet: 5
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to