jenkins-bot has submitted this change and it was merged.
Change subject: Use generate-user-files in test builds
......................................................................
Use generate-user-files in test builds
Change-Id: Ia4f8b37fd80240f4b06b36fc45dfc4ea0ed4e9d0
---
M .travis.yml
1 file changed, 16 insertions(+), 17 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 2077d2b..fc28d39 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,25 +16,22 @@
- if [[ "$PYSETUP_TEST_EXTRAS" == "1" ]]; then sudo apt-get install
-y liblua5.1-dev; fi
install:
+
- if [[ "$SITE_ONLY" == '1' ]]; then export USE_NOSE=1; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2==0.8.0;
fi
- pip install six
- export GITHUB_USER=`echo $TRAVIS_REPO_SLUG | cut -d '/' -f 1`
- - mkdir ~/.pywikibot
- mkdir ~/.python-eggs
- chmod 700 ~/.python-eggs
- - touch ~/.pywikibot/user-config.py
- - echo "import os" >> ~/.pywikibot/user-config.py
- - echo "mylang = '$LANGUAGE'" >> ~/.pywikibot/user-config.py
- - echo "family = '$FAMILY'" >> ~/.pywikibot/user-config.py
+ # httplib2 is needed to run generate_user_files
+ - if [[ "$EXTERNALS_HTTPLIB2" == "1" ]]; then
+ (cd externals/httplib2 && python setup.py install) ;
+ else
+ rm -rf externals/httplib2 ;
+ pip install httplib2 ;
+ fi
- - echo "password_file =
os.path.expanduser('~/.pywikibot/passwordfile')" >>
~/.pywikibot/user-config.py
- - touch ~/.pywikibot/passwordfile
-
- - 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" ;
@@ -42,20 +39,22 @@
export PYWIKIBOT2_TEST_WRITE_FAIL=1 ;
fi
+ - mkdir ~/.pywikibot
+ - python -W error::UserWarning -m generate_user_files -dir:~/.pywikibot/
-family:$FAMILY -lang:$LANGUAGE -v -user:"$PYWIKIBOT2_USERNAME"
+
- if [[ -n "$USER_PASSWORD" && -n "$PYWIKIBOT2_USERNAME"
]]; then
- echo "usernames['$FAMILY']['$LANGUAGE'] =
'$PYWIKIBOT2_USERNAME'" >> ~/.pywikibot/user-config.py ;
echo "usernames['wikipedia']['en'] =
'$PYWIKIBOT2_USERNAME'" >> ~/.pywikibot/user-config.py ;
echo "usernames['wikipedia']['test'] =
'$PYWIKIBOT2_USERNAME'" >> ~/.pywikibot/user-config.py ;
echo "usernames['wikidata']['test'] =
'$PYWIKIBOT2_USERNAME'" >> ~/.pywikibot/user-config.py ;
echo "usernames['commons']['commons'] =
'$PYWIKIBOT2_USERNAME'" >> ~/.pywikibot/user-config.py ;
echo "('$PYWIKIBOT2_USERNAME', '$USER_PASSWORD')" >
~/.pywikibot/passwordfile ;
+ echo "import os" >> ~/.pywikibot/user-config.py ;
+ echo "password_file =
os.path.expanduser('~/.pywikibot/passwordfile')" >>
~/.pywikibot/user-config.py ;
fi
- - if [[ "$EXTERNALS_HTTPLIB2" == "1" ]]; then
- (cd externals/httplib2 && python setup.py install) ;
- else
- rm -rf externals/httplib2 ;
- fi
+ - 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
- python -c "import setuptools; print(setuptools.__version__)"
--
To view, visit
https://gerrit.wikimedia.org/r/208504
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4f8b37fd80240f4b06b36fc45dfc4ea0ed4e9d0
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>