You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 25, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 25, 2020. It is now read-only.
vcstools make test fails on our build machines #77
It's in the unicode command line test. I'm not sure why this fails. I'm going to try on my own lucid machine. It works fine on travis and my precise machine.
A branches/test_branch
.WARNING [vcstools] No tar subdirectory chosen via the 'version' argument for url: https://code.ros.org/svn/release/download/stacks/exploration/exploration-0.3.0/exploration-0.3.0.tar.bz2[/vcstools]
.......
======================================================================
ERROR: test_shell_command_verbose (test.test_base.BaseTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rosbuild/hudson/workspace/_release-vcstools/test/test_base.py", line 76, in test_shell_command_verbose
run_shell_command("echo %s"%(b'\xc3\xa4'.decode('UTF-8')), shell=True, verbose=True)
File "/home/rosbuild/hudson/workspace/_release-vcstools/src/vcstools/common.py", line 132, in run_shell_command
env=env)
File "/usr/lib/python2.6/subprocess.py", line 633, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child
raise child_exception
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 5: ordinal not in range(128)
Tully, it seems Jenkins attempts to run the tests for a unused ancient branch:
Commencing build of Revision bfe2a2a (origin/get_branches_enhancement)
As opposed to building master only.
So it seems mostly like a Jenkins config issue now. A workaround would be to remove all non-master branches from the vcstools repo, if you cannot figure out how to tell Jenkins to never mind anything else than master.
Tests pass for me using python 2.6.8, which is also what runs on
Travis. Can you find out which python2.6 minor version runs on
jenkins? It does not seem like 2.6.8 (from the line numbers).
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/77#issuecomment-19493314
.
Yes, I am at a loss for how to fix this, if we use some outdated version of
py2.6, then I'd recommend wrapping the test in "if sys.version_info >= (2,
6, 8)".
Tests pass for me using python 2.6.8, which is also what runs on Travis. Can you find out which python2.6 minor version runs on jenkins? It does not seem like 2.6.8 (from the line numbers).
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/77#issuecomment-19493314
.
Right now the lucid version of stdeb is the only one which will successfully release with python 2.6 support which we need for other lucid machines. I guess we'll need to add that check. This test looks like it's protecting another test. Is there another test we need to filter as well?
Not sure what you mean by "protecting another test".
As far as I can remember, the test itself makes sure unicode is properly
treated when passed to the shell command and when being returned as a
result of a shell command.
The failure of the test in python 2.6.5 seems to merely reflect a unicode
bug in that old python2.6 version.
The test has no asserts, as if there was a bug, there'd be an exception of
the kind we sadly observe with python 2.6.5. Asserts could be added to make
sure any encoding / decoding does not alter content, but I was happy at the
time to reach a state of no exceptions.
Unless i am mistaken, all other tests passed, so no need to filter more
than that.
Right now the lucid version of stdeb is the only one which will
successfully release with python 2.6 support which we need for other lucid
machines. I guess we'll need to add that check. This test looks like it's
protecting another test. Is there another test we need to filter as well?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/77#issuecomment-19561068
.
FYI, the stock python in RHEL 6 has this issue. I'm going to exclude this test in the official RPM for now, but it would be nice to see an official fix...
Taking another look at this, it seems that this test is broken whenever Python 2 isn't configured to use something besides ASCII, which is in fact, the default encoding. It appears that Python 2.7 will use the system's LANG value to change to unicode, which is why this doesn't repro consistently on workstations vs minimalist build environments.
On RHEL 7, which uses Python 2.7, I have to set LANG=en_US.UTF-8 to work around the bug. On Fedora, I can use the lighter weight LANG=C.UTF-8, but the locale really doesn't matter as long as the encoding is unicode. On RHEL 6, which uses Python 2.6, I know of no simple workaround.
Maybe we should just skip the test if Python isn't configured to use Unicode by default, or maybe we should make the decoding lossy. I'm not sure. I'm really not even sure what the test is designed to look for - the ticket numbers from commits at that time don't appear to index into this repositories issues.
Activity
tfoote commentedon Jun 14, 2013
It works from my desktop lucid machine.
tkruse commentedon Jun 15, 2013
Tully, it seems Jenkins attempts to run the tests for a unused ancient branch:
Commencing build of Revision bfe2a2a (origin/get_branches_enhancement)
As opposed to building master only.
So it seems mostly like a Jenkins config issue now. A workaround would be to remove all non-master branches from the vcstools repo, if you cannot figure out how to tell Jenkins to never mind anything else than master.
tfoote commentedon Jun 15, 2013
Good catch on the branch. I've fixed that: ros-infrastructure/buildfarm@c961354
However that test is still present and failing. http://jenkins.willowgarage.com:8080/job/_release-vcstools/3/console
tkruse commentedon Jun 15, 2013
Hm, that looks like py2.6:
/usr/lib/python2.6/subprocess.py
Tests pass for me using python 2.6.8, which is also what runs on
Travis. Can you find out which python2.6 minor version runs on
jenkins? It does not seem like 2.6.8 (from the line numbers).
On Sat, Jun 15, 2013 at 10:41 AM, Tully Foote [email protected]:
tkruse commentedon Jun 15, 2013
Yes, I am at a loss for how to fix this, if we use some outdated version of
py2.6, then I'd recommend wrapping the test in "if sys.version_info >= (2,
6, 8)".
On Sat, Jun 15, 2013 at 11:28 AM, Thibault Kruse
[email protected]:
tfoote commentedon Jun 17, 2013
The machine we're running on is stock lucid:
Right now the lucid version of stdeb is the only one which will successfully release with python 2.6 support which we need for other lucid machines. I guess we'll need to add that check. This test looks like it's protecting another test. Is there another test we need to filter as well?
tkruse commentedon Jun 17, 2013
Not sure what you mean by "protecting another test".
As far as I can remember, the test itself makes sure unicode is properly
treated when passed to the shell command and when being returned as a
result of a shell command.
The failure of the test in python 2.6.5 seems to merely reflect a unicode
bug in that old python2.6 version.
The test has no asserts, as if there was a bug, there'd be an exception of
the kind we sadly observe with python 2.6.5. Asserts could be added to make
sure any encoding / decoding does not alter content, but I was happy at the
time to reach a state of no exceptions.
Unless i am mistaken, all other tests passed, so no need to filter more
than that.
On Mon, Jun 17, 2013 at 7:35 PM, Tully Foote [email protected]:
cottsay commentedon Dec 14, 2014
FYI, the stock python in RHEL 6 has this issue. I'm going to exclude this test in the official RPM for now, but it would be nice to see an official fix...
--scott
cottsay commentedon Feb 12, 2019
Taking another look at this, it seems that this test is broken whenever Python 2 isn't configured to use something besides ASCII, which is in fact, the default encoding. It appears that Python 2.7 will use the system's
LANGvalue to change to unicode, which is why this doesn't repro consistently on workstations vs minimalist build environments.On RHEL 7, which uses Python 2.7, I have to set
LANG=en_US.UTF-8to work around the bug. On Fedora, I can use the lighter weightLANG=C.UTF-8, but the locale really doesn't matter as long as the encoding is unicode. On RHEL 6, which uses Python 2.6, I know of no simple workaround.Maybe we should just skip the test if Python isn't configured to use Unicode by default, or maybe we should make the decoding lossy. I'm not sure. I'm really not even sure what the test is designed to look for - the ticket numbers from commits at that time don't appear to index into this repositories issues.
Related to commit 1e49d1c.
tkruse commentedon Feb 14, 2019
I would also be fine with skipping the test for all python2 versions, if that helps.
Possibly running tests with any hack to change the encoding such as described in https://stackoverflow.com/questions/2276200/changing-default-encoding-of-python would also work I guess.
dirk-thomas commentedon Jun 25, 2020
Closing since the repository is about to be archived: see #166.