Skip to content

Conversation

@kjeldflarup
Copy link
Contributor

Problem is described in this issue #203

This PR solves this by allowing the .run method for the SSHDriver and the ShellDriver to take extra arguments. All tests that have conflicting characters must be rewritten.

stdout, stderr, returncode = command.run("/tmp/pcm52test/test-registration", codec = "iso-8859-1" )
stdout, stderr, returncode = command.run("/tmp/pcm52test/test-registration", codecerrors = "ignore" )
stdout, stderr, returncode = command.run("/tmp/pcm52test/test-registration", codec = "iso-8859-1", codecerrors = "ignore" )

The parameters are passed to str.decode(), for more information on possible parameters see https://docs.python.org/3/howto/unicode.html

The defaults is "utf-8" and strict, which is also the defaults for str.decode(), and thus no existing tests will be affected by this PR.

@codecov-io
Copy link

codecov-io commented Mar 5, 2018

Codecov Report

Merging #214 into master will increase coverage by <.1%.
The diff coverage is 42.8%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #214     +/-   ##
========================================
+ Coverage    54.6%   54.6%   +<.1%     
========================================
  Files          93      93             
  Lines        5269    5270      +1     
========================================
+ Hits         2881    2882      +1     
  Misses       2388    2388
Impacted Files Coverage Δ
labgrid/driver/sshdriver.py 38% <33.3%> (+0.5%) ⬆️
labgrid/driver/shelldriver.py 29% <50%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5edee07...5b13ce6. Read the comment docs.

…nd ShellDriver

This adds support for targets which do not use UTF-8 on the command
line.

Signed-off-by: Kjeld Flarup <kfa@deif.com>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Copy link
Member

@jluebbe jluebbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed some white-space and remote a leftover debug print().

@jluebbe jluebbe merged commit 8692366 into labgrid-project:master Mar 19, 2018
@jluebbe jluebbe mentioned this pull request Mar 19, 2018
@kjeldflarup kjeldflarup deleted the run_decode branch April 9, 2018 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants