jenkins-bot has submitted this change and it was merged.

Change subject: Run only site tests on fr.wikt and test.wd
......................................................................


Run only site tests on fr.wikt and test.wd

Use nosetests with attribute selectors to only run tests which
will only use the site in the matrix.

Bug: T70671
Change-Id: I60f4b87ff414ba9ab32abc39bf2a90801056c8a5
---
M .travis.yml
1 file changed, 14 insertions(+), 3 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, but someone else must approve
  XZise: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.travis.yml b/.travis.yml
index 019338c..c708c6a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,6 +10,7 @@
   - sudo apt-get install -y liblua5.1-dev
 
 install:
+  - if [[ "$SITE_ONLY" == '1' ]]; then export USE_NOSE=1; fi
   - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install ordereddict 
unittest2==0.6.0; fi
   - pip install six
   - export GITHUB_USER=`echo $TRAVIS_REPO_SLUG | cut -d '/' -f 1`
@@ -27,6 +28,7 @@
 
   - echo "max_retries = 2" >> ~/.pywikibot/user-config.py
   - echo "maximum_GET_length = 5000" >> ~/.pywikibot/user-config.py
+  - echo "console_encoding = 'utf8'" >> ~/.pywikibot/user-config.py
 
   - if [[ "$GITHUB_USER" == "wikimedia" ]]; then 
PYWIKIBOT2_USERNAME="Pywikibot-test"; fi
 
@@ -44,7 +46,16 @@
   - python -c "import setuptools; print(setuptools.__version__)"
 
 script:
-  - if [[ "$USE_NOSE" == "1" ]]; then nosetests -v ; else python setup.py 
test; fi
+  - if [[ "$USE_NOSE" == "1" ]]; then
+      if [[ "$SITE_ONLY" == "1" ]]; then
+        echo "Running site tests only code ${LANGUAGE} on family ${FAMILY}" ;
+        nosetests tests -v -a "family=$FAMILY,code=$LANGUAGE" ;
+      else
+        nosetests tests -v ;
+      fi ;
+    else
+      python setup.py test ;
+    fi
 
 env:
   global:
@@ -56,8 +67,8 @@
   matrix:
     - LANGUAGE=en FAMILY=wikipedia
     - LANGUAGE=ar FAMILY=wikipedia PYSETUP_TEST_EXTRAS=1
-    - LANGUAGE=test FAMILY=wikidata
-    - LANGUAGE=fr FAMILY=wiktionary
+    - LANGUAGE=test FAMILY=wikidata SITE_ONLY=1
+    - LANGUAGE=fr FAMILY=wiktionary SITE_ONLY=1
 
 notifications:
   email:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I60f4b87ff414ba9ab32abc39bf2a90801056c8a5
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jay...@gmail.com>
Gerrit-Reviewer: John Vandenberg <jay...@gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl>
Gerrit-Reviewer: XZise <commodorefabia...@gmx.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
Pywikibot-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to