From 47d012c8135c8067d32b4f0272fab13333b60c10 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Tue, 18 Jul 2017 09:38:43 +0200 Subject: [PATCH 1/8] Add fake identity for VCSs This makes the unit tests self contained. --- .travis.yml | 7 ------- test/scm_test_base.py | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 90893b6..4af32e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,13 +12,6 @@ install: - sudo apt-get clean - sudo apt-get install -qq zsh - sudo pip install vcstools nose-cov coverage pyyaml coveralls -# Set git config to silence some stuff in the tests - - git config --global user.email "foo@example.com" - - git config --global user.name "Foo Bar" -# Set the hg user - - echo -e "[ui]\nusername = Your Name " >> ~/.hgrc -# Set the bzr user - - bzr whoami "Your Name " # command to run tests script: - python -c 'import sys; print(sys.path)' diff --git a/test/scm_test_base.py b/test/scm_test_base.py index 31fe4aa..807b48a 100644 --- a/test/scm_test_base.py +++ b/test/scm_test_base.py @@ -133,6 +133,7 @@ class AbstractRosinstallCLITest(unittest.TestCase): """Base class for cli tests""" @classmethod def setUpClass(self): + os.environ['EMAIL'] = 'Your Name ' self.new_environ = copy.copy(os.environ) self.new_environ["PYTHONPATH"] = os.path.join(os.getcwd(), "src") if "ROS_WORKSPACE" in self.new_environ: From ffb8ba8f7e41f7870c9133d729b71363f2c2f794 Mon Sep 17 00:00:00 2001 From: William Woodall Date: Tue, 18 Jul 2017 14:22:43 -0700 Subject: [PATCH 2/8] stop testing unsupported Python versions --- .travis.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4af32e9..b4422f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,18 @@ language: python python: - - "2.6" - "2.7" - - "3.2" - - "3.3" - "3.4" + - "3.5" # command to install dependencies install: -# develop seems to be required by travis since 02/2013 - - python setup.py build develop + - python setup.py build - sudo apt-get clean - - sudo apt-get install -qq zsh + - sudo apt-get update && sudo apt-get install -qq zsh - sudo pip install vcstools nose-cov coverage pyyaml coveralls # command to run tests script: - python -c 'import sys; print(sys.path)' - - nosetests --with-coverage --cover-package=wstool + - python setup.py nosetests --with-coverage --cover-package=wstool notifications: email: false after_success: From a78fda3bad9a8e6713eb2acef097de420460415b Mon Sep 17 00:00:00 2001 From: William Woodall Date: Mon, 24 Jul 2017 13:52:56 -0700 Subject: [PATCH 3/8] install coverage too --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b4422f8..bcb85ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ install: - python setup.py build - sudo apt-get clean - sudo apt-get update && sudo apt-get install -qq zsh - - sudo pip install vcstools nose-cov coverage pyyaml coveralls + - sudo pip install vcstools nose-cov coverage pyyaml coveralls coverage # command to run tests script: - python -c 'import sys; print(sys.path)' From 2a7408c50af685fcaf15c08869965fc3b63e66cb Mon Sep 17 00:00:00 2001 From: William Woodall Date: Mon, 24 Jul 2017 13:58:02 -0700 Subject: [PATCH 4/8] Update .travis.yml --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index bcb85ef..ff6fd63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,14 +5,14 @@ python: - "3.5" # command to install dependencies install: - - python setup.py build + - python setup.py install - sudo apt-get clean - sudo apt-get update && sudo apt-get install -qq zsh - - sudo pip install vcstools nose-cov coverage pyyaml coveralls coverage + - sudo pip install vcstools nose coverage pyyaml coveralls # command to run tests script: - python -c 'import sys; print(sys.path)' - - python setup.py nosetests --with-coverage --cover-package=wstool + - python setup.py nosetests --with-coverage --cover-package=wstool test notifications: email: false after_success: From 30081f6916a400c1c5811af2182b9099bdd11d14 Mon Sep 17 00:00:00 2001 From: William Woodall Date: Mon, 24 Jul 2017 14:12:58 -0700 Subject: [PATCH 5/8] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ff6fd63..25b02d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ install: # command to run tests script: - python -c 'import sys; print(sys.path)' + - python -c 'import coverage' - python setup.py nosetests --with-coverage --cover-package=wstool test notifications: email: false From 9a44a045628b1ef878baf4677954db61986602bb Mon Sep 17 00:00:00 2001 From: William Woodall Date: Mon, 24 Jul 2017 14:16:18 -0700 Subject: [PATCH 6/8] make sure correct python is being used --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 25b02d6..2642d56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ install: - python setup.py install - sudo apt-get clean - sudo apt-get update && sudo apt-get install -qq zsh - - sudo pip install vcstools nose coverage pyyaml coveralls + - python -m pip install vcstools nose coverage pyyaml coveralls # command to run tests script: - python -c 'import sys; print(sys.path)' From e7086d16c08c4d5f947fe9691b56f7a002ad2a3d Mon Sep 17 00:00:00 2001 From: William Woodall Date: Mon, 24 Jul 2017 14:45:51 -0700 Subject: [PATCH 7/8] the test structure layout is strange in this repo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2642d56..ae235a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ install: script: - python -c 'import sys; print(sys.path)' - python -c 'import coverage' - - python setup.py nosetests --with-coverage --cover-package=wstool test + - python -m nose --with-coverage --cover-package=wstool test/local notifications: email: false after_success: From 80d90266224ed6907b33055c942e84fb5dc907ae Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Tue, 25 Jul 2017 07:35:09 +0200 Subject: [PATCH 8/8] Add author name and mail for git --- test/scm_test_base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/scm_test_base.py b/test/scm_test_base.py index 807b48a..ab611ac 100644 --- a/test/scm_test_base.py +++ b/test/scm_test_base.py @@ -133,6 +133,9 @@ class AbstractRosinstallCLITest(unittest.TestCase): """Base class for cli tests""" @classmethod def setUpClass(self): + os.environ['GIT_AUTHOR_NAME'] = 'Your Name' + os.environ['GIT_COMMITTER_NAME'] = 'Your Name' + os.environ['GIT_AUTHOR_EMAIL'] = 'name@example.com' os.environ['EMAIL'] = 'Your Name ' self.new_environ = copy.copy(os.environ) self.new_environ["PYTHONPATH"] = os.path.join(os.getcwd(), "src")