AbdealiJK has uploaded a new change for review.

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

Change subject: travis: Use pytest-attrib for SITE_ONLY=1 jobs
......................................................................

travis: Use pytest-attrib for SITE_ONLY=1 jobs

Bug: T135659
Change-Id: I81a9823e803bbf237f4aa65e9c1ba6ae812514ef
---
M .travis.yml
1 file changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/05/289605/1

diff --git a/.travis.yml b/.travis.yml
index 400862f..2e241fc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,11 +28,8 @@
   # default 'install' step to install all dependencies listed in
   # requirements.txt to verify that a minimal install works as expected.
   # Instead install requests in the before_script step below.
-  - if [[ "$PYSETUP_TEST_EXTRAS" != '1' ]]; then rm requirements.txt ; fi
-
-  - if [[ "$SITE_ONLY" == '1' ]]; then
-      export USE_NOSE=1 ;
-    elif [[ "$PYSETUP_TEST_EXTRAS" != '1' ]]; then
+  - if [[ "$PYSETUP_TEST_EXTRAS" != '1' ]]; then
+      rm requirements.txt ;
       export USE_PYTEST=1 ;
     fi
 
@@ -101,8 +98,13 @@
         python setup.py nosetests --tests tests --verbosity=2 --with-trim 
--with-coverage --cover-package=. ;
       fi ;
     elif [[ "$USE_PYTEST" == "1" ]]; then
-      pip install --upgrade pytest-runner pytest-cov pytest-timeout 
"pytest>=2.8.0" ;
-      python setup.py pytest --addopts="-vvv -s --timeout=300 --cov=." ;
+      pip install --upgrade pytest-runner pytest-cov pytest-timeout 
"pytest>=2.8.0" git+https://github.com/AbdealiJK/pytest-attrib;
+      if [[ "$SITE_ONLY" == "1" ]]; then
+        echo "Running site tests only code ${LANGUAGE} on family ${FAMILY}" ;
+        python setup.py pytest --addopts="-vvv -s --timeout=300 --cov=. -a 
\"family==$FAMILY and code==$LANGUAGE\"" ;
+      else
+        python setup.py pytest --addopts="-vvv -s --timeout=300 --cov=." ;
+      fi
     else
       coverage run setup.py test ;
     fi

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81a9823e803bbf237f4aa65e9c1ba6ae812514ef
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: AbdealiJK <[email protected]>

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

Reply via email to